ksheumaker / homeassistant-apsystems_ecur

Home Assistant custom component for local querying of APSystems ECU-R Solar System
Apache License 2.0
166 stars 42 forks source link

Update sensor.py #24

Closed HAEdwin closed 2 years ago

HAEdwin commented 2 years ago

Fix for the energy dashboard thanks to @royvanmanen (issue #21 and #22) Solves log entries: WARNING (MainThread) [homeassistant.components.sensor] Entity sensor.ecu_lifetime_energy (<class 'custom_components.apsystems_ecur.sensor.APSystemsECUSensor'>) with state_class measurement has set last_reset. Setting last_reset for entities with state_class other than 'total' is deprecated and will be removed from Home Assistant Core 2021.11. Please update your configuration if state_class is manually configured, otherwise report it to the custom component author.

HAEdwin commented 2 years ago

As from version HA 2021.12 device_state_attributes is deprecated and should be replaced by extra_state_attributes.