From 03962ab6ae33e7e1e59626bd6befd524313712a2 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 6 Dec 2015 09:08:34 -0800 Subject: [PATCH] Fix demo component messing up the config Could cause HTTP to be initialised in production mode. --- homeassistant/components/demo.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/demo.py b/homeassistant/components/demo.py index 8a8c5ed31e5..8b4b3fcce6c 100644 --- a/homeassistant/components/demo.py +++ b/homeassistant/components/demo.py @@ -53,9 +53,10 @@ def setup(hass, config): bootstrap.setup_component(hass, 'sun') # Setup demo platforms + demo_config = config.copy() for component in COMPONENTS_WITH_DEMO_PLATFORM: - bootstrap.setup_component( - hass, component, {component: {CONF_PLATFORM: 'demo'}}) + demo_config[component] = {CONF_PLATFORM: 'demo'} + bootstrap.setup_component(hass, component, demo_config) # Setup room groups lights = sorted(hass.states.entity_ids('light'))