From c1d728ce002ed41640a5ff3517a30812bd6bee22 Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Mon, 14 Dec 2015 18:31:09 -0500 Subject: [PATCH] Remove @property from update function --- homeassistant/components/sensor/wink-eggminder.py | 15 +++++++-------- homeassistant/components/wink.py | 11 +++++------ 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/homeassistant/components/sensor/wink-eggminder.py b/homeassistant/components/sensor/wink-eggminder.py index 9398d11d177..6da42811a48 100755 --- a/homeassistant/components/sensor/wink-eggminder.py +++ b/homeassistant/components/sensor/wink-eggminder.py @@ -10,8 +10,8 @@ import logging from homeassistant.helpers.entity import Entity from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['https://github.com/balloob/python-wink/archive/' - '42fdcfa721b1bc583688e3592d8427f4c13ba6d9.zip' +REQUIREMENTS = ['https://github.com/w1ll1am23/python-wink/archive/' + 'master.zip' '#python-wink==0.2'] def setup_platform(hass, config, add_devices, discovery_info=None): @@ -41,7 +41,7 @@ class WinkEggMinder(Entity): @property def state(self): """ Returns the state. """ - return self.egg_count + return self.wink.state() @property def unique_id(self): @@ -53,12 +53,11 @@ class WinkEggMinder(Entity): """ Returns the name of the sensor if any. """ return self.wink.name() - @property def update(self): """ Update state of the Egg Minder. """ self.wink.updateState() - @property - def egg_count(self): - """ The number of eggs """ - return self.wink.state() + #@property + #def egg_count(self): + # """ The number of eggs """ + # return self.wink.state() diff --git a/homeassistant/components/wink.py b/homeassistant/components/wink.py index 2ea93cce3a7..038bb046f78 100644 --- a/homeassistant/components/wink.py +++ b/homeassistant/components/wink.py @@ -1,8 +1,7 @@ """ homeassistant.components.wink -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 https://home-assistant.io/components/wink/ """ @@ -17,14 +16,14 @@ from homeassistant.const import ( ATTR_SERVICE, ATTR_DISCOVERED, ATTR_FRIENDLY_NAME) DOMAIN = "wink" -DEPENDENCIES = [] REQUIREMENTS = ['https://github.com/balloob/python-wink/archive/' - '9eb39eaba0717922815e673ad1114c685839d890.zip' - '#python-wink==0.1.1'] + '42fdcfa721b1bc583688e3592d8427f4c13ba6d9.zip' + '#python-wink==0.2'] DISCOVER_LIGHTS = "wink.lights" DISCOVER_SWITCHES = "wink.switches" DISCOVER_SENSORS = "wink.sensors" +DISCOVER_LOCKS = "wink.locks" def setup(hass, config): @@ -42,7 +41,7 @@ def setup(hass, config): ('light', pywink.get_bulbs, DISCOVER_LIGHTS), ('switch', pywink.get_switches, DISCOVER_SWITCHES), ('sensor', pywink.get_sensors, DISCOVER_SENSORS), - ('sensor', pywink.get_eggtrays, DISCOVER_SENSORS)): + ('lock', pywink.get_locks, DISCOVER_LOCKS)): if func_exists(): component = get_component(component_name)