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

+6 -1
View File
@@ -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)