From: Bernhard Tittelbach Date: Mon, 28 Feb 2011 21:50:05 +0000 (+0000) Subject: threshold was too high X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=c51f9e115383e472ad8e7ff907ad78b5c3abc8f5;p=svn42.git threshold was too high --- diff --git a/switch-power.py b/switch-power.py index aae4261..87b6efd 100755 --- a/switch-power.py +++ b/switch-power.py @@ -46,6 +46,7 @@ class UWSConfig: self.config_parser.set('slug','ids_decke','deckevorne deckehinten') self.config_parser.set('slug','ids_nonpresent_off','ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown ymhvoldown lichter ymhpoweroff lichter') self.config_parser.set('slug','light_threshold_brightness','400') + self.config_parser.set('slug','light_difference_decke','110') #self.config_parser.set('slug','time_day','6:00-17:00') self.config_parser.add_section('debug') self.config_parser.set('debug','enabled',"False") @@ -289,7 +290,7 @@ def eventPanic(): switchPower(id,False) light_value_after = getLightValueNow() if not (light_value_before is None or light_value_after is None): - old_deckenlicht_state = (abs(light_value_before - light_value_after) > 200) + old_deckenlicht_state = (abs(light_value_before - light_value_after) > int(uwscfg.slug_light_difference_decke)) for id in lst1: switchPower(id,False) for times in range(1,6):