From 56ce3e5f5ac44a1820c93ec11d946ab60ccc3350 Mon Sep 17 00:00:00 2001 From: William Scanlon Date: Thu, 21 Jan 2016 11:12:00 -0500 Subject: [PATCH] Wink siren support --- homeassistant/components/light/wink.py | 2 +- homeassistant/components/lock/wink.py | 2 +- homeassistant/components/sensor/wink.py | 2 +- homeassistant/components/switch/wink.py | 4 +++- homeassistant/components/wink.py | 3 ++- requirements_all.txt | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/homeassistant/components/light/wink.py b/homeassistant/components/light/wink.py index 294f092c050..f9cdfc432f9 100644 --- a/homeassistant/components/light/wink.py +++ b/homeassistant/components/light/wink.py @@ -12,7 +12,7 @@ from homeassistant.components.light import ATTR_BRIGHTNESS from homeassistant.components.wink import WinkToggleDevice from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['python-wink==0.4.1'] +REQUIREMENTS = ['python-wink==0.4.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 6c457c722f9..a203a59bf69 100644 --- a/homeassistant/components/lock/wink.py +++ b/homeassistant/components/lock/wink.py @@ -11,7 +11,7 @@ import logging from homeassistant.components.lock import LockDevice from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['python-wink==0.4.1'] +REQUIREMENTS = ['python-wink==0.4.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 8acc99f2d3d..f57f8fdc4cf 100644 --- a/homeassistant/components/sensor/wink.py +++ b/homeassistant/components/sensor/wink.py @@ -11,7 +11,7 @@ import logging from homeassistant.helpers.entity import Entity from homeassistant.const import CONF_ACCESS_TOKEN, STATE_OPEN, STATE_CLOSED -REQUIREMENTS = ['python-wink==0.4.1'] +REQUIREMENTS = ['python-wink==0.4.2'] def setup_platform(hass, config, add_devices, discovery_info=None): diff --git a/homeassistant/components/switch/wink.py b/homeassistant/components/switch/wink.py index e01065c3cd4..88df1a158ef 100644 --- a/homeassistant/components/switch/wink.py +++ b/homeassistant/components/switch/wink.py @@ -11,7 +11,7 @@ import logging from homeassistant.components.wink import WinkToggleDevice from homeassistant.const import CONF_ACCESS_TOKEN -REQUIREMENTS = ['python-wink==0.4.1'] +REQUIREMENTS = ['python-wink==0.4.2'] def setup_platform(hass, config, add_devices, discovery_info=None): @@ -32,3 +32,5 @@ def setup_platform(hass, config, add_devices, discovery_info=None): add_devices(WinkToggleDevice(switch) for switch in pywink.get_switches()) add_devices(WinkToggleDevice(switch) for switch in pywink.get_powerstrip_outlets()) + add_devices(WinkToggleDevice(switch) for switch in pywink.get_sirens()) + diff --git a/homeassistant/components/wink.py b/homeassistant/components/wink.py index a719c5613a4..29a7a5537d1 100644 --- a/homeassistant/components/wink.py +++ b/homeassistant/components/wink.py @@ -16,7 +16,7 @@ from homeassistant.const import ( ATTR_SERVICE, ATTR_DISCOVERED, ATTR_FRIENDLY_NAME) DOMAIN = "wink" -REQUIREMENTS = ['python-wink==0.4.1'] +REQUIREMENTS = ['python-wink==0.4.2'] DISCOVER_LIGHTS = "wink.lights" DISCOVER_SWITCHES = "wink.switches" @@ -38,6 +38,7 @@ def setup(hass, config): for component_name, func_exists, discovery_type in ( ('light', pywink.get_bulbs, DISCOVER_LIGHTS), ('switch', lambda: pywink.get_switches or + pywink.get_sirens or pywink.get_powerstrip_outlets, DISCOVER_SWITCHES), ('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays, DISCOVER_SENSORS), diff --git a/requirements_all.txt b/requirements_all.txt index 0a05e573699..45c57425eac 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -69,7 +69,7 @@ pyvera==0.2.7 # homeassistant.components.lock.wink # homeassistant.components.sensor.wink # homeassistant.components.switch.wink -python-wink==0.4.1 +python-wink==0.4.2 # homeassistant.components.media_player.cast pychromecast==0.6.14