From f3956ea728aaada458bbcbf53b62a0ab50f86f05 Mon Sep 17 00:00:00 2001 From: Calin Crisan Date: Mon, 25 Aug 2014 20:25:17 +0300 Subject: [PATCH] motion detection is now left untouched when working schedule is disabled --- src/wsswitch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wsswitch.py b/src/wsswitch.py index 3710172..ffb1d17 100644 --- a/src/wsswitch.py +++ b/src/wsswitch.py @@ -87,8 +87,8 @@ def _check_ws(): working_schedule_type = camera_config.get('@working_schedule_type') or 'outside' must_be_enabled = False - if not working_schedule: # working schedule disabled, motion detection always on - must_be_enabled = True + if not working_schedule: # working schedule disabled, motion detection left untouched + continue else: now_during = _during_working_schedule(now, working_schedule) @@ -102,7 +102,7 @@ def _check_ws(): motionctl.set_motion_detection(camera_id, False) - elif not currently_enabled and must_be_enabled: + elif not currently_enabled and must_be_enabled: logging.debug('must enable motion detection for camera with id %(id)s (%(what)s working schedule)' % { 'id': camera_id, 'what': working_schedule_type}) -- 2.39.5