From 566c143ee385057e4a3dfffb1bd7a6ae69898d09 Mon Sep 17 00:00:00 2001 From: Dan Smith Date: Sun, 28 Feb 2016 07:45:34 -0800 Subject: [PATCH] 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. --- homeassistant/components/wemo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/components/wemo.py b/homeassistant/components/wemo.py index 0427815c6e1..e6fc88bea1a 100644 --- a/homeassistant/components/wemo.py +++ b/homeassistant/components/wemo.py @@ -78,7 +78,7 @@ def setup(hass, config): # Add static devices from the config file devices.extend((address, None) - for address in config['wemo'].get('static', [])) + for address in config.get(DOMAIN, {}).get('static', [])) for address, device in devices: port = pywemo.ouimeaux_device.probe_wemo(address)