Skip to content

Commit

Permalink
Replace deprecated property
Browse files Browse the repository at this point in the history
WARNING (MainThread) [homeassistant.helpers.entity] Entity sensor.veolia_monthly_consumption (<class 'custom_components.veolia.sensor.VeoliaMonthlyUsageSensor'>) implements device_state_attributes. Please report it to the custom component author.

As from version HA 2021.12 device_state_attributes is deprecated and should be replaced by extra_state_attributes.
  • Loading branch information
ALaDoffe authored Dec 22, 2021
1 parent 2004924 commit 05a424e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/veolia/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def device_info(self):
}

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes."""
return {
"last_report": self.coordinator.data[LAST_REPORT_TIMESTAMP],
Expand Down

0 comments on commit 05a424e

Please sign in to comment.