From 5ba9ac64656a7810c2ce46dcc960527e8c5a8dd5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 7 Mar 2016 19:21:26 +0100 Subject: [PATCH] Fix PEP257 issues --- config/custom_components/example.py | 12 +++++++----- config/custom_components/hello_world.py | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/config/custom_components/example.py b/config/custom_components/example.py index 3f961b99569..4d3df9328d8 100644 --- a/config/custom_components/example.py +++ b/config/custom_components/example.py @@ -101,9 +101,10 @@ def track_devices(hass, entity_id, old_state, new_state): @track_time_change(hour=7, minute=0, second=0) def wake_up(hass, now): - """ - Turn it on in the morning (7 AM) if there are people home and - it is not already on. + """Turn light on in the morning. + + Turn the light on at 7 AM if there are people home and it is not already + on. """ if not TARGET_ID: return @@ -126,8 +127,9 @@ def all_lights_off(hass, entity_id, old_state, new_state): @service(DOMAIN, SERVICE_FLASH) def flash_service(hass, call): - """ - Service that will turn the target off for 10 seconds if on and vice versa. + """Service that will toggle the target. + + Set the light to off for 10 seconds if on and vice versa. """ if not TARGET_ID: return diff --git a/config/custom_components/hello_world.py b/config/custom_components/hello_world.py index f24971a1462..b35e9f6c0ed 100644 --- a/config/custom_components/hello_world.py +++ b/config/custom_components/hello_world.py @@ -20,7 +20,6 @@ DEPENDENCIES = [] def setup(hass, config): """Setup our skeleton component.""" - # States are in the format DOMAIN.OBJECT_ID. hass.states.set('hello_world.Hello_World', 'Works!')