Skip to content

Commit

Permalink
Use device_state_attributes (#5518)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabaff authored and balloob committed Jan 23, 2017
1 parent 9bc9e7f commit d5119a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions homeassistant/components/binary_sensor/digital_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@


def setup_platform(hass, config, add_devices, discovery_info=None):
"""Setup the Digital Ocean droplet sensor."""
"""Set up the Digital Ocean droplet sensor."""
digital_ocean = get_component('digital_ocean')
droplets = config.get(CONF_DROPLETS)

Expand Down Expand Up @@ -68,7 +68,7 @@ def sensor_class(self):
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,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/binary_sensor/threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def sensor_class(self):
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,
Expand Down
2 changes: 1 addition & 1 deletion homeassistant/components/switch/digital_ocean.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def is_on(self):
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,
Expand Down

0 comments on commit d5119a0

Please sign in to comment.