From 531b702d65790f627b50951e32454d031007c70d Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Tue, 26 May 2015 17:02:38 +0200 Subject: [PATCH] fix typo --- homeassistant/components/sun.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/homeassistant/components/sun.py b/homeassistant/components/sun.py index ae33f86f01e..24ef6e24e05 100644 --- a/homeassistant/components/sun.py +++ b/homeassistant/components/sun.py @@ -4,13 +4,13 @@ homeassistant.components.sun Provides functionality to keep track of the sun. - Event listener -------------- -The suns event listener will call the service -when the sun rises or sets with an offset. -The sun evnt need to have the type 'sun', which service to call, -which event (sunset or sunrise) and the offset. +The suns event listener will call the service when the sun rises or sets with +an offset. + +The sun event need to have the type 'sun', which service to call, which event +(sunset or sunrise) and the offset. { "type": "sun", @@ -18,8 +18,6 @@ which event (sunset or sunrise) and the offset. "event": "sunset", "offset": "-01:00:00" } - - """ import logging from datetime import timedelta @@ -240,12 +238,12 @@ class SunEventListener(ServiceEventListener): return next_time def schedule_next_event(self, hass, next_event): - """ Schedule the event """ + """ Schedule the event. """ next_time = self.__get_next_time(next_event) # pylint: disable=unused-argument def execute(now): - """ Call the execute method """ + """ Call the execute method. """ self.execute(hass) hass.track_point_in_time(execute, next_time) @@ -272,7 +270,7 @@ class SunriseEventListener(SunEventListener): """ This class is used the call a service when the sun rises. """ def schedule(self, hass): - """ Schedule the event """ + """ Schedule the event. """ next_rising_dt = next_rising(hass) next_time_dt = self.schedule_next_event(hass, next_rising_dt)