Added available method to all wink components
This commit is contained in:
1 parent
47d5c4f437
commit
208a7c9e60
8 files changed
+38
-8
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user