mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Added wink power strip support
This commit is contained in:
parent
431656bbcf
commit
17dd8ddc9a
@ -30,3 +30,5 @@ def setup_platform(hass, config, add_devices, discovery_info=None):
|
|||||||
pywink.set_bearer_token(token)
|
pywink.set_bearer_token(token)
|
||||||
|
|
||||||
add_devices(WinkToggleDevice(switch) for switch in pywink.get_switches())
|
add_devices(WinkToggleDevice(switch) for switch in pywink.get_switches())
|
||||||
|
add_devices(WinkToggleDevice(switch) for switch in
|
||||||
|
pywink.get_powerstrip_outlets())
|
||||||
|
@ -37,9 +37,10 @@ def setup(hass, config):
|
|||||||
# Load components for the devices in the Wink that we support
|
# Load components for the devices in the Wink that we support
|
||||||
for component_name, func_exists, discovery_type in (
|
for component_name, func_exists, discovery_type in (
|
||||||
('light', pywink.get_bulbs, DISCOVER_LIGHTS),
|
('light', pywink.get_bulbs, DISCOVER_LIGHTS),
|
||||||
('switch', pywink.get_switches, DISCOVER_SWITCHES),
|
('switch', lambda: pywink.get_switches or
|
||||||
('sensor', lambda: pywink.get_sensors or pywink.get_eggtrays,
|
pywink.get_powerstrip_outlets, DISCOVER_SWITCHES),
|
||||||
DISCOVER_SENSORS),
|
('sensor', lambda: pywink.get_sensors or
|
||||||
|
pywink.get_eggtrays, DISCOVER_SENSORS),
|
||||||
('lock', pywink.get_locks, DISCOVER_LOCKS)):
|
('lock', pywink.get_locks, DISCOVER_LOCKS)):
|
||||||
|
|
||||||
if func_exists():
|
if func_exists():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user