Added available method to all wink components
This commit is contained in:
parent
47d5c4f437
commit
208a7c9e60
8 changed files with 38 additions and 8 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue