From f991e43cfc6fc233ebef7640e19b23925c3479f1 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Thu, 25 Sep 2008 11:00:44 +0000 Subject: [PATCH] Update from STefan eingecheckt. git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@250 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- contrib/fs20_holidays.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/fs20_holidays.sh b/contrib/fs20_holidays.sh index e8ab01ba5..c9d3dc6d1 100755 --- a/contrib/fs20_holidays.sh +++ b/contrib/fs20_holidays.sh @@ -67,18 +67,18 @@ do case $variant in oft) - printf "event %02d: at +%02d:%02d:%02d set %s on-for-timer %d\n" $i $hour $minute $second ${devices[$dev]} $ontime - command=`printf "$command at +%02d:%02d:%02d set %s on-for-timer %d;;" $hour $minute $second ${devices[$dev]} $ontime` + printf "event %02d: define at.random.%02d at +%02d:%02d:%02d set %s on-for-timer %d\n" $i $i $hour $minute $second ${devices[$dev]} $ontime + command=`printf "$command define at.random.%02d at +%02d:%02d:%02d set %s on-for-timer %d;;" $i $hour $minute $second ${devices[$dev]} $ontime` ;; onoff) offtime=$(($starttime + $ontime)) hour_off=$(($offtime / 60)) minute_off=$(($offtime % 60)) second_off=$(($RANDOM * 60 / $random_max)) - printf "event %02d/on : at +%02d:%02d:%02d set %s on\n" $i $hour $minute $second ${devices[$dev]} - printf "event %02d/off: at +%02d:%02d:%02d set %s off\n" $i $hour_off $minute_off $second_off ${devices[$dev]} - command=`printf "$command at +%02d:%02d:%02d set %s on;;" $hour $minute $second ${devices[$dev]}` - command=`printf "$command at +%02d:%02d:%02d set %s off;;" $hour_off $minute_off $second_off ${devices[$dev]}` + printf "event %02d/on : define at.random.on.%02d at +%02d:%02d:%02d set %s on\n" $i $i $hour $minute $second ${devices[$dev]} + printf "event %02d/off: define at.random.off.%02d at +%02d:%02d:%02d set %s off\n" $i $i $hour_off $minute_off $second_off ${devices[$dev]} + command=`printf "$command define at.random.on.%02d at +%02d:%02d:%02d set %s on;;" $i $hour $minute $second ${devices[$dev]}` + command=`printf "$command define at.random.off.%02d at +%02d:%02d:%02d set %s off;;" $i $hour_off $minute_off $second_off ${devices[$dev]}` ;; *) echo "no variant specifieno variant specified!!"