diff --git a/app/actor/HueTrigger.py b/app/actor/HueTrigger.py index 3a7952e08b7..8b87e3c9272 100644 --- a/app/actor/HueTrigger.py +++ b/app/actor/HueTrigger.py @@ -103,5 +103,5 @@ class HueTrigger(object): # Did all devices leave the house? elif category == STATE_CATEGORY_ALL_DEVICES and new_state.state == STATE_DEVICE_NOT_HOME and lights_are_on: - self.logger.info("Everyone has left. Turning lights off") + self.logger.info("Everyone has left but lights are on. Turning lights off") self.turn_light_off() diff --git a/app/observer/Timer.py b/app/observer/Timer.py index 5defc2f8210..f6cbd46ff63 100644 --- a/app/observer/Timer.py +++ b/app/observer/Timer.py @@ -47,13 +47,13 @@ def track_time_change(eventbus, action, year='*', month='*', day='*', hour='*', assert isinstance(event, Event), "event needs to be of Event type" if (point_in_time is not None and event.data['now'] > point_in_time) or \ - point_in_time is None and \ + (point_in_time is None and \ matcher(event.data['now'].year, year) and \ matcher(event.data['now'].month, month) and \ matcher(event.data['now'].day, day) and \ matcher(event.data['now'].hour, hour) and \ matcher(event.data['now'].minute, minute) and \ - matcher(event.data['now'].second, second): + matcher(event.data['now'].second, second)): # point_in_time are exact points in time so we always remove it after fire event.remove_listener = listen_once or point_in_time is not None diff --git a/app/observer/WeatherWatcher.py b/app/observer/WeatherWatcher.py index a5b29854aa5..b7d4db6c94c 100644 --- a/app/observer/WeatherWatcher.py +++ b/app/observer/WeatherWatcher.py @@ -34,8 +34,8 @@ class WeatherWatcher(object): return ephem.localtime(self.observer.next_setting(self.sun)) def update_sun_state(self, now=None): - next_rising = ephem.localtime(self.observer.next_rising(self.sun)) - next_setting = ephem.localtime(self.observer.next_setting(self.sun)) + next_rising = self.next_sun_rising() + next_setting = self.next_sun_setting() if next_rising > next_setting: new_state = SUN_STATE_ABOVE_HORIZON