mirror of
https://github.com/home-assistant/core.git
synced 2025-07-13 08:17:08 +00:00
Remove @property from update function
This commit is contained in:
parent
5755c6f593
commit
c1d728ce00
@ -10,8 +10,8 @@ import logging
|
|||||||
from homeassistant.helpers.entity import Entity
|
from homeassistant.helpers.entity import Entity
|
||||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||||
|
|
||||||
REQUIREMENTS = ['https://github.com/balloob/python-wink/archive/'
|
REQUIREMENTS = ['https://github.com/w1ll1am23/python-wink/archive/'
|
||||||
'42fdcfa721b1bc583688e3592d8427f4c13ba6d9.zip'
|
'master.zip'
|
||||||
'#python-wink==0.2']
|
'#python-wink==0.2']
|
||||||
|
|
||||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||||
@ -41,7 +41,7 @@ class WinkEggMinder(Entity):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
""" Returns the state. """
|
""" Returns the state. """
|
||||||
return self.egg_count
|
return self.wink.state()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
@ -53,12 +53,11 @@ class WinkEggMinder(Entity):
|
|||||||
""" Returns the name of the sensor if any. """
|
""" Returns the name of the sensor if any. """
|
||||||
return self.wink.name()
|
return self.wink.name()
|
||||||
|
|
||||||
@property
|
|
||||||
def update(self):
|
def update(self):
|
||||||
""" Update state of the Egg Minder. """
|
""" Update state of the Egg Minder. """
|
||||||
self.wink.updateState()
|
self.wink.updateState()
|
||||||
|
|
||||||
@property
|
#@property
|
||||||
def egg_count(self):
|
#def egg_count(self):
|
||||||
""" The number of eggs """
|
# """ The number of eggs """
|
||||||
return self.wink.state()
|
# return self.wink.state()
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
"""
|
"""
|
||||||
homeassistant.components.wink
|
homeassistant.components.wink
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
Connects to a Wink hub and loads relevant components to control its devices.
|
Connects to a Wink hub and loads relevant components to control its devices.
|
||||||
|
|
||||||
For more details about this component, please refer to the documentation at
|
For more details about this component, please refer to the documentation at
|
||||||
https://home-assistant.io/components/wink/
|
https://home-assistant.io/components/wink/
|
||||||
"""
|
"""
|
||||||
@ -17,14 +16,14 @@ from homeassistant.const import (
|
|||||||
ATTR_SERVICE, ATTR_DISCOVERED, ATTR_FRIENDLY_NAME)
|
ATTR_SERVICE, ATTR_DISCOVERED, ATTR_FRIENDLY_NAME)
|
||||||
|
|
||||||
DOMAIN = "wink"
|
DOMAIN = "wink"
|
||||||
DEPENDENCIES = []
|
|
||||||
REQUIREMENTS = ['https://github.com/balloob/python-wink/archive/'
|
REQUIREMENTS = ['https://github.com/balloob/python-wink/archive/'
|
||||||
'9eb39eaba0717922815e673ad1114c685839d890.zip'
|
'42fdcfa721b1bc583688e3592d8427f4c13ba6d9.zip'
|
||||||
'#python-wink==0.1.1']
|
'#python-wink==0.2']
|
||||||
|
|
||||||
DISCOVER_LIGHTS = "wink.lights"
|
DISCOVER_LIGHTS = "wink.lights"
|
||||||
DISCOVER_SWITCHES = "wink.switches"
|
DISCOVER_SWITCHES = "wink.switches"
|
||||||
DISCOVER_SENSORS = "wink.sensors"
|
DISCOVER_SENSORS = "wink.sensors"
|
||||||
|
DISCOVER_LOCKS = "wink.locks"
|
||||||
|
|
||||||
|
|
||||||
def setup(hass, config):
|
def setup(hass, config):
|
||||||
@ -42,7 +41,7 @@ def setup(hass, config):
|
|||||||
('light', pywink.get_bulbs, DISCOVER_LIGHTS),
|
('light', pywink.get_bulbs, DISCOVER_LIGHTS),
|
||||||
('switch', pywink.get_switches, DISCOVER_SWITCHES),
|
('switch', pywink.get_switches, DISCOVER_SWITCHES),
|
||||||
('sensor', pywink.get_sensors, DISCOVER_SENSORS),
|
('sensor', pywink.get_sensors, DISCOVER_SENSORS),
|
||||||
('sensor', pywink.get_eggtrays, DISCOVER_SENSORS)):
|
('lock', pywink.get_locks, DISCOVER_LOCKS)):
|
||||||
|
|
||||||
if func_exists():
|
if func_exists():
|
||||||
component = get_component(component_name)
|
component = get_component(component_name)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user