Skip to content

Commit

Permalink
Replace Entity.device_state_attributes with Entity.extra_state_attrib…
Browse files Browse the repository at this point in the history
…utes
  • Loading branch information
grm committed Dec 21, 2021
1 parent fd51878 commit 5fadcc7
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion custom_components/gardena_smart_system/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"domain": "gardena_smart_system",
"name": "Gardena Smart System integration",
"version": "0.3",
"version": "0.2.5b4",
"config_flow": true,
"documentation": "https://github.com/py-smart-gardena/hass-gardena-smart-system",
"issue_tracker": "https://github.com/py-smart-gardena/hass-gardena-smart-system/issues",
Expand Down
2 changes: 1 addition & 1 deletion custom_components/gardena_smart_system/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def state(self):
return getattr(self._device, self._sensor_type)

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes of the sensor."""
return {
ATTR_BATTERY_LEVEL: self._device.battery_level,
Expand Down
6 changes: 3 additions & 3 deletions custom_components/gardena_smart_system/switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def error(self):
return self._error_message

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes of the water valve."""
return {
ATTR_ACTIVITY: self._device.valve_activity,
Expand Down Expand Up @@ -229,7 +229,7 @@ def error(self):
return self._error_message

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes of the power switch."""
return {
ATTR_ACTIVITY: self._device.activity,
Expand Down Expand Up @@ -332,7 +332,7 @@ def error(self):
return self._error_message

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes of the smart irrigation control."""
return {
ATTR_ACTIVITY: self._device.valves[self._valve_id]["activity"],
Expand Down
2 changes: 1 addition & 1 deletion custom_components/gardena_smart_system/vacuum.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def error(self):
return ""

@property
def device_state_attributes(self):
def extra_state_attributes(self):
"""Return the state attributes of the lawn mower."""
return {
ATTR_ACTIVITY: self._device.activity,
Expand Down

0 comments on commit 5fadcc7

Please sign in to comment.