From b459a29947d40c3fa5b36443ae9038dc0e85bea6 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Mon, 16 Mar 2015 22:45:42 -0700 Subject: [PATCH] Fix style issues --- homeassistant/components/demo.py | 43 ++++++++++++++++---------------- homeassistant/loader.py | 2 +- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/homeassistant/components/demo.py b/homeassistant/components/demo.py index e382ebb0abc..53774210868 100644 --- a/homeassistant/components/demo.py +++ b/homeassistant/components/demo.py @@ -51,23 +51,23 @@ def setup(hass, config): # Setup scripts bootstrap.setup_component( hass, 'script', - {'script': - {'demo': { + {'script': { + 'demo': { 'alias': 'Demo {}'.format(lights[0]), 'sequence': [{ - 'execute_service': 'light.turn_off', - 'service_data': {ATTR_ENTITY_ID: lights[0]} - }, { - 'delay': {'seconds': 5} - }, { - 'execute_service': 'light.turn_on', - 'service_data': {ATTR_ENTITY_ID: lights[0]} - }, { - 'delay': {'seconds': 5} - }, { - 'execute_service': 'light.turn_off', - 'service_data': {ATTR_ENTITY_ID: lights[0]} - }] + 'execute_service': 'light.turn_off', + 'service_data': {ATTR_ENTITY_ID: lights[0]} + }, { + 'delay': {'seconds': 5} + }, { + 'execute_service': 'light.turn_on', + 'service_data': {ATTR_ENTITY_ID: lights[0]} + }, { + 'delay': {'seconds': 5} + }, { + 'execute_service': 'light.turn_off', + 'service_data': {ATTR_ENTITY_ID: lights[0]} + }] }}}) # Setup scenes @@ -76,17 +76,16 @@ def setup(hass, config): {'scene': [ {'name': 'Romantic lights', 'entities': { - lights[0]: True, - lights[1]: {'state': 'on', 'xy_color': [0.33, 0.66], - 'brightness': 200}, + lights[0]: True, + lights[1]: {'state': 'on', 'xy_color': [0.33, 0.66], + 'brightness': 200}, }}, {'name': 'Switch on and off', 'entities': { - switches[0]: True, - switches[1]: False, + switches[0]: True, + switches[1]: False, }}, - ] - }) + ]}) # Setup fake device tracker hass.states.set("device_tracker.paulus", "home", diff --git a/homeassistant/loader.py b/homeassistant/loader.py index 7ada1aa42f5..4bbab3c1ac6 100644 --- a/homeassistant/loader.py +++ b/homeassistant/loader.py @@ -169,7 +169,7 @@ def load_order_components(components): # Push recorder to first place in load order if 'recorder' in load_order: - load_order.promote('recorder'.DOMAIN) + load_order.promote('recorder') return load_order