X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=track-presence.py;fp=track-presence.py;h=066d2a69f73d4edcc48388bcbcc67c6565d649bd;hb=0f3fa497d55b8fe03144ea3b3eb96d24674d1f2c;hp=2fb1a4b05ba87a5ab3c6b4dca2c91be7cf59f034;hpb=3b5400c944c0270a9e338669fb570a06097e1762;p=svn42.git diff --git a/track-presence.py b/track-presence.py index 2fb1a4b..066d2a6 100755 --- a/track-presence.py +++ b/track-presence.py @@ -313,7 +313,7 @@ class StatusTracker: #(threading.Thread): if self.door_open != self.door_open_previously: self.door_who=who self.door_manual_switch_used=(who is None or len(who) == 0) - self.door_physically_present=(self.door_manual_switch_used or how == "Card") + self.door_physically_present=(self.door_manual_switch_used or how.startswith("Card")) if not self.door_open_previously is None: self.last_door_operation_unixts=time.time() self.lock.release() @@ -321,7 +321,7 @@ class StatusTracker: #(threading.Thread): self.lock.acquire() self.door_open_previously = self.door_open self.lock.release() - logging.debug("doorOpen: open: %s, who: %s, how:%s, manual_switch: %s; physically_present: %s" % (self.door_open,self.door_who,how,self.door_manual_switch_used,self.door_manual_switch_used)); + logging.debug("doorOpen: open: %s, who: %s, how: %s, manual_switch: %s; physically_present: %s" % (self.door_open,self.door_who,how,self.door_manual_switch_used,self.door_manual_switch_used)); def doorClosed(self,who,how): self.uwscfg.checkConfigUpdates() @@ -330,7 +330,7 @@ class StatusTracker: #(threading.Thread): if self.door_open != self.door_open_previously: self.door_who=who self.door_manual_switch_used=(who is None or len(who) == 0) - self.door_physically_present=(self.door_manual_switch_used or how == "Card") + self.door_physically_present=(self.door_manual_switch_used or how.startswith("Card")) if not self.door_open_previously is None: self.last_door_operation_unixts=time.time() self.lock.release()