From 6b49e86236164dbb010b7dd78052667a699024f8 Mon Sep 17 00:00:00 2001 From: dietmar63 <> Date: Thu, 7 May 2015 18:02:35 +0000 Subject: [PATCH] 98_WeekdayTimer: http://forum.fhem.de/index.php/topic,36988.msg292688.html#msg292688 git-svn-id: https://svn.fhem.de/fhem/trunk@8540 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_WeekdayTimer.pm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/fhem/FHEM/98_WeekdayTimer.pm b/fhem/FHEM/98_WeekdayTimer.pm index 3bae655b3..8ffa138c8 100644 --- a/fhem/FHEM/98_WeekdayTimer.pm +++ b/fhem/FHEM/98_WeekdayTimer.pm @@ -589,7 +589,7 @@ sub WeekdayTimer_Update($) { # ggf. Device schalten WeekdayTimer_Device_Schalten($hash, $newParam, $tage); - my ($aktTime, $aktParameter, $nextTime, $nextParameter) = + my ($indx, $aktTime, $aktParameter, $nextTime, $nextParameter) = WeekdayTimer_searchAktNext($hash, time()+5); readingsBeginUpdate($hash); @@ -762,12 +762,8 @@ sub WeekdayTimer_Device_Schalten($$$) { $command = "set @ " . $setModifier . " %"; $command = $hash->{COMMAND} if (defined $hash->{COMMAND}); - $command = "{ fhem('" . $command . "') }"; - - $condition = WeekdayTimer_Condition ($hash, $tage); - $tageAsHash = WeekdayTimer_tageAsHash($hash, $tage); - - $command = "{" . $tageAsHash . "; if " .$condition . " " . $command . "}"; + + my $activeTimer = WeekdayTimer_isAnActiveTimer ($hash, $tage, $newParam); my $isHeating = $setModifier gt ""; my $aktParam = ReadingsVal($hash->{DEVICE}, $setModifier, ""); @@ -779,7 +775,7 @@ sub WeekdayTimer_Device_Schalten($$$) { Log3 $hash, 4, "[$name] aktParam:$aktParam newParam:$newParam - is $disabled_txt disabled"; #Kommando ausführen - if ($command && !$disabled && $aktParam ne $newParam) { + if ($command && !$disabled && $aktParam ne $newParam && $activeTimer) { $newParam =~ s/:/ /g; my %specials = ( "%NAME" => $hash->{DEVICE}, "%EVENT" => $newParam);