Merge pull request #856 from w1ll1am23/Wink_power_strip_support
Wink power strip support
This commit is contained in:
commit
bed9b038c8
6 changed files with 12 additions and 9 deletions
|
@ -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.3.1']
|
||||
REQUIREMENTS = ['python-wink==0.4.1']
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices_callback, discovery_info=None):
|
||||
|
|
|
@ -11,7 +11,7 @@ import logging
|
|||
from homeassistant.components.lock import LockDevice
|
||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||
|
||||
REQUIREMENTS = ['python-wink==0.3.1']
|
||||
REQUIREMENTS = ['python-wink==0.4.1']
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
|
|
@ -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.3.1']
|
||||
REQUIREMENTS = ['python-wink==0.4.1']
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
|
|
@ -11,7 +11,7 @@ import logging
|
|||
from homeassistant.components.wink import WinkToggleDevice
|
||||
from homeassistant.const import CONF_ACCESS_TOKEN
|
||||
|
||||
REQUIREMENTS = ['python-wink==0.3.1']
|
||||
REQUIREMENTS = ['python-wink==0.4.1']
|
||||
|
||||
|
||||
def setup_platform(hass, config, add_devices, discovery_info=None):
|
||||
|
@ -30,3 +30,5 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||
pywink.set_bearer_token(token)
|
||||
|
||||
add_devices(WinkToggleDevice(switch) for switch in pywink.get_switches())
|
||||
add_devices(WinkToggleDevice(switch) for switch in
|
||||
pywink.get_powerstrip_outlets())
|
||||
|
|
|
@ -16,7 +16,7 @@ from homeassistant.const import (
|
|||
ATTR_SERVICE, ATTR_DISCOVERED, ATTR_FRIENDLY_NAME)
|
||||
|
||||
DOMAIN = "wink"
|
||||
REQUIREMENTS = ['python-wink==0.3.1']
|
||||
REQUIREMENTS = ['python-wink==0.4.1']
|
||||
|
||||
DISCOVER_LIGHTS = "wink.lights"
|
||||
DISCOVER_SWITCHES = "wink.switches"
|
||||
|
@ -37,9 +37,10 @@ def setup(hass, config):
|
|||
# Load components for the devices in the Wink that we support
|
||||
for component_name, func_exists, discovery_type in (
|
||||
('light', pywink.get_bulbs, DISCOVER_LIGHTS),
|
||||
('switch', pywink.get_switches, DISCOVER_SWITCHES),
|
||||
('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays,
|
||||
DISCOVER_SENSORS),
|
||||
('switch', lambda: pywink.get_switches or
|
||||
pywink.get_powerstrip_outlets, DISCOVER_SWITCHES),
|
||||
('sensor', lambda: pywink.get_sensors or
|
||||
pywink.get_eggtrays, DISCOVER_SENSORS),
|
||||
('lock', pywink.get_locks, DISCOVER_LOCKS)):
|
||||
|
||||
if func_exists():
|
||||
|
|
|
@ -69,7 +69,7 @@ pyvera==0.2.3
|
|||
# homeassistant.components.lock.wink
|
||||
# homeassistant.components.sensor.wink
|
||||
# homeassistant.components.switch.wink
|
||||
python-wink==0.3.1
|
||||
python-wink==0.4.1
|
||||
|
||||
# homeassistant.components.media_player.cast
|
||||
pychromecast==0.6.14
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue