From 78695a975bdad302e3bd6b95e4d560914c29ae91 Mon Sep 17 00:00:00 2001 From: realraum Date: Fri, 30 Jul 2010 14:31:12 +0000 Subject: [PATCH] --lightbug --- switch-power.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() -- 1.7.10.4