Clean up state_attributes vs device_state_attributes
This commit is contained in:
parent
681b84e1bd
commit
f08b77dc4c
23 changed files with 66 additions and 138 deletions
|
@ -13,7 +13,7 @@ from homeassistant.helpers import validate_config
|
|||
from homeassistant.helpers.entity import ToggleEntity
|
||||
from homeassistant.const import (
|
||||
EVENT_PLATFORM_DISCOVERED, CONF_ACCESS_TOKEN,
|
||||
ATTR_SERVICE, ATTR_DISCOVERED, ATTR_FRIENDLY_NAME)
|
||||
ATTR_SERVICE, ATTR_DISCOVERED)
|
||||
|
||||
DOMAIN = "wink"
|
||||
REQUIREMENTS = ['python-wink==0.5.0']
|
||||
|
@ -80,13 +80,6 @@ class WinkToggleDevice(ToggleEntity):
|
|||
""" True if light is on. """
|
||||
return self.wink.state()
|
||||
|
||||
@property
|
||||
def state_attributes(self):
|
||||
""" Returns optional state attributes. """
|
||||
return {
|
||||
ATTR_FRIENDLY_NAME: self.wink.name()
|
||||
}
|
||||
|
||||
def turn_on(self, **kwargs):
|
||||
""" Turns the switch on. """
|
||||
self.wink.set_state(True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue