Use device_state_attributes (#5518)

This commit is contained in:
Fabian Affolter 2017-01-23 22:21:12 +01:00 committed by Paulus Schoutsen
parent 9bc9e7fbc4
commit d5119a0520
3 changed files with 4 additions and 4 deletions

View file

@ -68,7 +68,7 @@ class DigitalOceanBinarySensor(BinarySensorDevice):
return DEFAULT_SENSOR_CLASS
@property
def state_attributes(self):
def device_state_attributes(self):
"""Return the state attributes of the Digital Ocean droplet."""
return {
ATTR_CREATED_AT: self.data.created_at,

View file

@ -110,7 +110,7 @@ class ThresholdSensor(BinarySensorDevice):
return self._sensor_class
@property
def state_attributes(self):
def device_state_attributes(self):
"""Return the state attributes of the sensor."""
return {
ATTR_ENTITY_ID: self._entity_id,

View file

@ -64,7 +64,7 @@ class DigitalOceanSwitch(SwitchDevice):
return self.data.status == 'active'
@property
def state_attributes(self):
def device_state_attributes(self):
"""Return the state attributes of the Digital Ocean droplet."""
return {
ATTR_CREATED_AT: self.data.created_at,