Add LightSwitch to discovery, default unnown devices to switches for compatability.
This commit is contained in:
parent
72144945b4
commit
bbf8897a51
1 changed files with 4 additions and 4 deletions
|
@ -25,6 +25,7 @@ WEMO_MODEL_DISPATCH = {
|
||||||
'Maker': DISCOVER_SWITCHES,
|
'Maker': DISCOVER_SWITCHES,
|
||||||
'Motion': DISCOVER_MOTION,
|
'Motion': DISCOVER_MOTION,
|
||||||
'Socket': DISCOVER_SWITCHES,
|
'Socket': DISCOVER_SWITCHES,
|
||||||
|
'LightSwitch': DISCOVER_SWITCHES
|
||||||
}
|
}
|
||||||
WEMO_SERVICE_DISPATCH = {
|
WEMO_SERVICE_DISPATCH = {
|
||||||
DISCOVER_LIGHTS: 'light',
|
DISCOVER_LIGHTS: 'light',
|
||||||
|
@ -64,10 +65,9 @@ def setup(hass, config):
|
||||||
return
|
return
|
||||||
KNOWN_DEVICES.append(mac)
|
KNOWN_DEVICES.append(mac)
|
||||||
|
|
||||||
service = WEMO_MODEL_DISPATCH.get(model_name)
|
service = WEMO_MODEL_DISPATCH.get(model_name) or DISCOVER_SWITCHES
|
||||||
component = WEMO_SERVICE_DISPATCH.get(service)
|
component = WEMO_SERVICE_DISPATCH.get(service)
|
||||||
|
|
||||||
if service is not None:
|
|
||||||
discovery.discover(hass, service, discovery_info,
|
discovery.discover(hass, service, discovery_info,
|
||||||
component, config)
|
component, config)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue