Wink water leak sensor (#2572)

This commit is contained in:
William Scanlon 2016-07-20 10:39:45 -04:00 committed by Paulus Schoutsen
parent aed9ab0271
commit 53f9809567
9 changed files with 13 additions and 10 deletions

View File

@ -13,14 +13,15 @@ from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.helpers.entity import Entity
from homeassistant.loader import get_component
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
# These are the available sensors mapped to binary_sensor class
SENSOR_TYPES = {
"opened": "opening",
"brightness": "light",
"vibration": "vibration",
"loudness": "sound"
"loudness": "sound",
"liquid_detected": "moisture"
}
@ -74,6 +75,8 @@ class WinkBinarySensorDevice(WinkDevice, BinarySensorDevice, Entity):
return self.wink.vibration_boolean()
elif self.capability == "brightness":
return self.wink.brightness_boolean()
elif self.capability == "liquid_detected":
return self.wink.liquid_boolean()
else:
return self.wink.state()

View File

@ -10,7 +10,7 @@ from homeassistant.components.garage_door import GarageDoorDevice
from homeassistant.components.wink import WinkDevice
from homeassistant.const import CONF_ACCESS_TOKEN
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
def setup_platform(hass, config, add_devices, discovery_info=None):

View File

@ -14,7 +14,7 @@ from homeassistant.util import color as color_util
from homeassistant.util.color import \
color_temperature_mired_to_kelvin as mired_to_kelvin
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
def setup_platform(hass, config, add_devices_callback, discovery_info=None):

View File

@ -10,7 +10,7 @@ from homeassistant.components.lock import LockDevice
from homeassistant.components.wink import WinkDevice
from homeassistant.const import CONF_ACCESS_TOKEN
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
def setup_platform(hass, config, add_devices, discovery_info=None):

View File

@ -10,7 +10,7 @@ from homeassistant.components.rollershutter import RollershutterDevice
from homeassistant.components.wink import WinkDevice
from homeassistant.const import CONF_ACCESS_TOKEN
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
def setup_platform(hass, config, add_devices, discovery_info=None):

View File

@ -12,7 +12,7 @@ from homeassistant.helpers.entity import Entity
from homeassistant.components.wink import WinkDevice
from homeassistant.loader import get_component
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
SENSOR_TYPES = ['temperature', 'humidity']

View File

@ -10,7 +10,7 @@ from homeassistant.components.wink import WinkDevice
from homeassistant.const import CONF_ACCESS_TOKEN
from homeassistant.helpers.entity import ToggleEntity
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
def setup_platform(hass, config, add_devices, discovery_info=None):

View File

@ -12,7 +12,7 @@ from homeassistant.const import CONF_ACCESS_TOKEN, ATTR_BATTERY_LEVEL
from homeassistant.helpers.entity import Entity
DOMAIN = "wink"
REQUIREMENTS = ['python-wink==0.7.10', 'pubnub==3.8.2']
REQUIREMENTS = ['python-wink==0.7.11', 'pubnub==3.8.2']
SUBSCRIPTION_HANDLER = None
CHANNELS = []

View File

@ -347,7 +347,7 @@ python-twitch==1.3.0
# homeassistant.components.rollershutter.wink
# homeassistant.components.sensor.wink
# homeassistant.components.switch.wink
python-wink==0.7.10
python-wink==0.7.11
# homeassistant.components.keyboard
pyuserinput==0.1.9