Added wink component to auto-load other needed components
This commit is contained in:
1 parent
249cf244ca
commit
6cd53f2ddf
10 files changed
+147
-56
No files matched your search
@@ -24,16 +24,16 @@ def get_devices(hass, config):
|
||||
if isinstance(switch, pywemo.Switch)]
|
||||
|
||||
|
||||
def device_discovered(hass, config, info):
|
||||
def devices_discovered(hass, config, info):
|
||||
""" Called when a device is discovered. """
|
||||
_, discovery = get_pywemo()
|
||||
|
||||
if discovery is None:
|
||||
return
|
||||
return []
|
||||
|
||||
device = discovery.device_from_description(info)
|
||||
|
||||
return None if device is None else WemoSwitch(device)
|
||||
return [] if device is None else [WemoSwitch(device)]
|
||||
|
||||
|
||||
def get_pywemo():
|
||||
|
||||
Reference in new issue
Block a user