firstof9 / ha-openei

OpenEI integration for Home Assistant
MIT License
15 stars 2 forks source link

[BUG] Sensor implements device_state_attributes #57

Closed zanix closed 2 years ago

zanix commented 2 years ago

Version of ha-openei

0.1.5

Describe the bug

As of Home Assistant version 2021.12.0, the usage of device_state_attributes is deprecated. It seems extra_state_attributes should be used from now on. This is the only place I found that states the replacement https://github.com/home-assistant/core/pull/47304 and I found docs about it here https://developers.home-assistant.io/docs/core/entity/#generic-properties It looks like they just renamed it as a PR with this change can be found here https://github.com/home-assistant/core/pull/59672/files.

Debug log

[homeassistant.helpers.entity] Entity sensor.pacificorp_idaho_current_energy_rate (<class 'custom_components.openei.sensor.OpenEISensor'>) implements device_state_attributes. Please report it to the custom component author.
[homeassistant.helpers.entity] Entity sensor.pacificorp_idaho_distributed_generation (<class 'custom_components.openei.sensor.OpenEISensor'>) implements device_state_attributes. Please report it to the custom component author.
[homeassistant.helpers.entity] Entity sensor.pacificorp_idaho_plan_name (<class 'custom_components.openei.sensor.OpenEISensor'>) implements device_state_attributes. Please report it to the custom component author.
[homeassistant.helpers.entity] Entity sensor.pacificorp_idaho_all_listed_rates (<class 'custom_components.openei.sensor.OpenEISensor'>) implements device_state_attributes. Please report it to the custom component author.
[homeassistant.helpers.entity] Entity sensor.pacificorp_idaho_monthly_energy_rate (<class 'custom_components.openei.sensor.OpenEISensor'>) implements device_state_attributes. Please report it to the custom component author.
[homeassistant.helpers.entity] Entity sensor.pacificorp_idaho_minimum_charge (<class 'custom_components.openei.sensor.OpenEISensor'>) implements device_state_attributes. Please report it to the custom component author.
firstof9 commented 2 years ago

This was addressed in a beta release, but I'll make it a full release. Thank you.