X-Git-Url: https://git.realraum.at/?p=svn42.git;a=blobdiff_plain;f=switch-power.py;fp=switch-power.py;h=7e6b77ca826a4fb10c115ae07489d22121e73fe9;hp=0c8069d2610f618fca6c3cbaf7572d34184ae55f;hb=99f4e5203866c4268fd38e9529ea36c511a4627a;hpb=df4d8e39e6182abf7a7b983e4db458420f5a091c diff --git a/switch-power.py b/switch-power.py index 0c8069d..7e6b77c 100755 --- a/switch-power.py +++ b/switch-power.py @@ -210,10 +210,10 @@ def eventNobodyHere(): def eventPanic(): logging.info("eventPanic(): switching around: "+uwscfg.slug_ids_panic) lst1 = uwscfg.slug_ids_panic.split(" ") - lst2 = map(lambda e:[e,True], lst1) + lst2 = map(lambda e:[e,False], lst1) for id in lst1: - switchPower(id,True) - for delay in map(lambda e: (40-e)/33.0,range(0,20)): + switchPower(id,False) + for delay in map(lambda e: (40-e)/33.0,range(10,33)): e = random.choice(lst2) e[1]=not e[1] switchPower(e[0],e[1])