Added available method to all wink components

This commit is contained in:
William Scanlon committed 2016-03-17 15:57:26 -04:00
1 parent 47d5c4f437
commit 208a7c9e60
8 files changed
+38 -8

No files matched your search

@@ -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()