From: realraum Date: Fri, 30 Jul 2010 14:31:12 +0000 (+0000) Subject: --lightbug X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=78695a975bdad302e3bd6b95e4d560914c29ae91;p=svn42.git --lightbug --- diff --git a/switch-power.py b/switch-power.py index 9f0a3a1..0c8069d 100755 --- a/switch-power.py +++ b/switch-power.py @@ -315,7 +315,10 @@ while True: continue m = RE_PHOTO.match(line) if not m is None: - if m.group(1) >= int(uwscfg.slug_light_threshold_brightness): + light_value = int(m.group(1)) + light_threshold = int(uwscfg.slug_light_threshold_brightness) + #logging.debug("photo value: %d threshold: %s" % (light_value,light_threshold)) + if light_value >= light_threshold: eventRoomGotBright() else: eventRoomGotDark()