diff --git a/homeassistant/components/binary_sensor/wink.py b/homeassistant/components/binary_sensor/wink.py index 47f6e3fff90..c24253ce715 100644 --- a/homeassistant/components/binary_sensor/wink.py +++ b/homeassistant/components/binary_sensor/wink.py @@ -10,7 +10,7 @@ from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.const import CONF_ACCESS_TOKEN from homeassistant.helpers.entity import Entity -REQUIREMENTS = ['python-wink==0.6.3'] +REQUIREMENTS = ['python-wink==0.6.4'] # These are the available sensors mapped to binary_sensor class SENSOR_TYPES = { @@ -77,6 +77,11 @@ class WinkBinarySensorDevice(BinarySensorDevice, Entity): """Return the name of the sensor if any.""" return self.wink.name() + @property + def available(self): + """True if connection == True.""" + return self.wink.available + def update(self): """Update state of the sensor.""" self.wink.update_state() diff --git a/homeassistant/components/garage_door/wink.py b/homeassistant/components/garage_door/wink.py index c1b662f2af2..cc3adeaa560 100644 --- a/homeassistant/components/garage_door/wink.py +++ b/homeassistant/components/garage_door/wink.py @@ -9,7 +9,7 @@ import logging from homeassistant.components.garage_door import GarageDoorDevice from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['python-wink==0.6.3'] +REQUIREMENTS = ['python-wink==0.6.4'] def setup_platform(hass, config, add_devices, discovery_info=None): @@ -57,6 +57,11 @@ class WinkGarageDoorDevice(GarageDoorDevice): """Return true if door is closed.""" return self.wink.state() == 0 + @property + def available(self): + """True if connection == True.""" + return self.wink.available + def close_door(self): """Close the door.""" self.wink.set_state(0) diff --git a/homeassistant/components/light/wink.py b/homeassistant/components/light/wink.py index 920b646c934..d24c01c34c3 100644 --- a/homeassistant/components/light/wink.py +++ b/homeassistant/components/light/wink.py @@ -9,7 +9,7 @@ import logging from homeassistant.components.light import ATTR_BRIGHTNESS, Light from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['python-wink==0.6.3'] +REQUIREMENTS = ['python-wink==0.6.4'] def setup_platform(hass, config, add_devices_callback, discovery_info=None): @@ -58,6 +58,11 @@ class WinkLight(Light): """Return the brightness of the light.""" return int(self.wink.brightness() * 255) + @property + def available(self): + """True if connection == True.""" + return self.wink.available + # pylint: disable=too-few-public-methods def turn_on(self, **kwargs): """Turn the switch on.""" diff --git a/homeassistant/components/lock/wink.py b/homeassistant/components/lock/wink.py index 9e8b4e29c10..1ccd787b6f6 100644 --- a/homeassistant/components/lock/wink.py +++ b/homeassistant/components/lock/wink.py @@ -9,7 +9,7 @@ import logging from homeassistant.components.lock import LockDevice from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['python-wink==0.6.3'] +REQUIREMENTS = ['python-wink==0.6.4'] def setup_platform(hass, config, add_devices, discovery_info=None): @@ -56,6 +56,11 @@ class WinkLockDevice(LockDevice): """Return true if device is locked.""" return self.wink.state() + @property + def available(self): + """True if connection == True.""" + return self.wink.available + def lock(self, **kwargs): """Lock the device.""" self.wink.set_state(True) diff --git a/homeassistant/components/sensor/wink.py b/homeassistant/components/sensor/wink.py index a4367068c6a..a68642a94eb 100644 --- a/homeassistant/components/sensor/wink.py +++ b/homeassistant/components/sensor/wink.py @@ -10,7 +10,7 @@ from homeassistant.const import (CONF_ACCESS_TOKEN, STATE_CLOSED, STATE_OPEN, TEMP_CELCIUS) from homeassistant.helpers.entity import Entity -REQUIREMENTS = ['python-wink==0.6.3'] +REQUIREMENTS = ['python-wink==0.6.4'] SENSOR_TYPES = ['temperature', 'humidity'] @@ -74,6 +74,11 @@ class WinkSensorDevice(Entity): """Return the name of the sensor if any.""" return self.wink.name() + @property + def available(self): + """True if connection == True.""" + return self.wink.available + def update(self): """Update state of the sensor.""" self.wink.update_state() diff --git a/homeassistant/components/switch/wink.py b/homeassistant/components/switch/wink.py index 63ce576d9bf..76ed638f0b3 100644 --- a/homeassistant/components/switch/wink.py +++ b/homeassistant/components/switch/wink.py @@ -9,7 +9,7 @@ import logging from homeassistant.components.wink import WinkToggleDevice from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['python-wink==0.6.3'] +REQUIREMENTS = ['python-wink==0.6.4'] def setup_platform(hass, config, add_devices, discovery_info=None): diff --git a/homeassistant/components/wink.py b/homeassistant/components/wink.py index de4c1b3c9ce..987dbfaf825 100644 --- a/homeassistant/components/wink.py +++ b/homeassistant/components/wink.py @@ -15,7 +15,7 @@ from homeassistant.helpers.entity import ToggleEntity from homeassistant.loader import get_component DOMAIN = "wink" -REQUIREMENTS = ['python-wink==0.6.3'] +REQUIREMENTS = ['python-wink==0.6.4'] DISCOVER_LIGHTS = "wink.lights" DISCOVER_SWITCHES = "wink.switches" @@ -84,6 +84,11 @@ class WinkToggleDevice(ToggleEntity): """Return true if device is on.""" return self.wink.state() + @property + def available(self): + """True if connection == True.""" + return self.wink.available + def turn_on(self, **kwargs): """Turn the device on.""" self.wink.set_state(True) diff --git a/requirements_all.txt b/requirements_all.txt index 1283963d4d0..03e12af0fe3 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -213,7 +213,7 @@ python-twitch==1.2.0 # homeassistant.components.lock.wink # homeassistant.components.sensor.wink # homeassistant.components.switch.wink -python-wink==0.6.3 +python-wink==0.6.4 # homeassistant.components.keyboard pyuserinput==0.1.9