X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=switch-power.py;h=0c8069d2610f618fca6c3cbaf7572d34184ae55f;hb=3d9f800ee0d70494066035af472fcef381a7496c;hp=9f0a3a1654df108e73c8c6fae93ff3814318aff2;hpb=d3fff6b992e8da2f399835976ba4e6f62b28dd28;p=svn42.git 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()