From 53f980956784b8ef67f1f0ab24ef1c175f098e2f Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Wed, 20 Jul 2016 10:39:45 -0400 Subject: [PATCH] Wink water leak sensor (#2572) --- homeassistant/components/binary_sensor/wink.py | 7 +++++-- homeassistant/components/garage_door/wink.py | 2 +- homeassistant/components/light/wink.py | 2 +- homeassistant/components/lock/wink.py | 2 +- homeassistant/components/rollershutter/wink.py | 2 +- homeassistant/components/sensor/wink.py | 2 +- homeassistant/components/switch/wink.py | 2 +- homeassistant/components/wink.py | 2 +- requirements_all.txt | 2 +- 9 files changed, 13 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/binary_sensor/wink.py b/homeassistant/components/binary_sensor/wink.py index dc1b7a005c0..0ab8d812819 100644 --- a/homeassistant/components/binary_sensor/wink.py +++ b/homeassistant/components/binary_sensor/wink.py @@ -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() diff --git a/homeassistant/components/garage_door/wink.py b/homeassistant/components/garage_door/wink.py index 964711d679d..68ba1ae709f 100644 --- a/homeassistant/components/garage_door/wink.py +++ b/homeassistant/components/garage_door/wink.py @@ -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): diff --git a/homeassistant/components/light/wink.py b/homeassistant/components/light/wink.py index 4fb009d23f0..c4a4e1bee1b 100644 --- a/homeassistant/components/light/wink.py +++ b/homeassistant/components/light/wink.py @@ -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): diff --git a/homeassistant/components/lock/wink.py b/homeassistant/components/lock/wink.py index 7b3b5ef0fec..c85655cbf35 100644 --- a/homeassistant/components/lock/wink.py +++ b/homeassistant/components/lock/wink.py @@ -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): diff --git a/homeassistant/components/rollershutter/wink.py b/homeassistant/components/rollershutter/wink.py index 27bd90e0275..8a791ea9b97 100644 --- a/homeassistant/components/rollershutter/wink.py +++ b/homeassistant/components/rollershutter/wink.py @@ -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): diff --git a/homeassistant/components/sensor/wink.py b/homeassistant/components/sensor/wink.py index 2b081a1934f..4f39bd9f2ff 100644 --- a/homeassistant/components/sensor/wink.py +++ b/homeassistant/components/sensor/wink.py @@ -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'] diff --git a/homeassistant/components/switch/wink.py b/homeassistant/components/switch/wink.py index 4f18d7d9456..1feb8e584bb 100644 --- a/homeassistant/components/switch/wink.py +++ b/homeassistant/components/switch/wink.py @@ -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): diff --git a/homeassistant/components/wink.py b/homeassistant/components/wink.py index 7be4c4d5cfe..4a45cd8576f 100644 --- a/homeassistant/components/wink.py +++ b/homeassistant/components/wink.py @@ -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 = [] diff --git a/requirements_all.txt b/requirements_all.txt index e4ce22018d9..e6f1c1530bf 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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