Use device_state_attributes (#5518)
This commit is contained in:
parent
9bc9e7fbc4
commit
d5119a0520
3 changed files with 4 additions and 4 deletions
|
@ -68,7 +68,7 @@ class DigitalOceanBinarySensor(BinarySensorDevice):
|
||||||
return DEFAULT_SENSOR_CLASS
|
return DEFAULT_SENSOR_CLASS
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes of the Digital Ocean droplet."""
|
"""Return the state attributes of the Digital Ocean droplet."""
|
||||||
return {
|
return {
|
||||||
ATTR_CREATED_AT: self.data.created_at,
|
ATTR_CREATED_AT: self.data.created_at,
|
||||||
|
|
|
@ -110,7 +110,7 @@ class ThresholdSensor(BinarySensorDevice):
|
||||||
return self._sensor_class
|
return self._sensor_class
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes of the sensor."""
|
"""Return the state attributes of the sensor."""
|
||||||
return {
|
return {
|
||||||
ATTR_ENTITY_ID: self._entity_id,
|
ATTR_ENTITY_ID: self._entity_id,
|
||||||
|
|
|
@ -64,7 +64,7 @@ class DigitalOceanSwitch(SwitchDevice):
|
||||||
return self.data.status == 'active'
|
return self.data.status == 'active'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def state_attributes(self):
|
def device_state_attributes(self):
|
||||||
"""Return the state attributes of the Digital Ocean droplet."""
|
"""Return the state attributes of the Digital Ocean droplet."""
|
||||||
return {
|
return {
|
||||||
ATTR_CREATED_AT: self.data.created_at,
|
ATTR_CREATED_AT: self.data.created_at,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue