From: Bernhard Tittelbach Date: Wed, 23 Nov 2011 20:54:38 +0000 (+0000) Subject: fix getPossibleWarning X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=3b5e13f79a9990199bb94cbf0102e447f49a7e49;p=svn42.git fix getPossibleWarning --- diff --git a/track-presence.py b/track-presence.py index cc27eb6..36580da 100755 --- a/track-presence.py +++ b/track-presence.py @@ -447,10 +447,10 @@ class StatusTracker: #(threading.Thread): def getPossibleWarning(self): with self.lock: somebody_present=self.last_somebody_present_result - if not self.door_unlocked and not somebody_present and not self.door_closed: - return "Nobody here and door locked but still ajar !" + if not somebody_present and not self.door_closed: + return "Nobody here but door ajar !" elif self.door_unlocked and not somebody_present and time.time() - self.last_door_operation_unixts >= float(self.uwscfg.tracker_sec_wait_for_movement_before_warning): - return "Door opened recently but nobody present" + return "Door unlocked recently but nobody present" elif self.door_unlocked and not somebody_present: self.checkAgainIn(float(self.uwscfg.tracker_sec_wait_for_movement_before_warning)) return None