mirror of
https://github.com/home-assistant/core.git
synced 2025-08-08 07:05:07 +02:00
Gracefully handle having no wemo config section
I broke this with my fix, where I assumed that we'd always have a wemo config section if we're running the wemo code. However, if we're fully auto-detected, we might not.
This commit is contained in:
committed by
Paulus Schoutsen
parent
3790764df9
commit
34b463f435
@@ -78,7 +78,7 @@ def setup(hass, config):
|
|||||||
|
|
||||||
# Add static devices from the config file
|
# Add static devices from the config file
|
||||||
devices.extend((address, None)
|
devices.extend((address, None)
|
||||||
for address in config['wemo'].get('static', []))
|
for address in config.get(DOMAIN, {}).get('static', []))
|
||||||
|
|
||||||
for address, device in devices:
|
for address, device in devices:
|
||||||
port = pywemo.ouimeaux_device.probe_wemo(address)
|
port = pywemo.ouimeaux_device.probe_wemo(address)
|
||||||
|
Reference in New Issue
Block a user