From e7cef9c40e4b876a42ca29bd23897c0a577071ca Mon Sep 17 00:00:00 2001 From: dietmar63 <> Date: Sat, 25 Apr 2015 20:24:29 +0000 Subject: [PATCH] 98_WeekdayTimer, 98_Heating_Control: added better logging and attr switchInThePast in 98_Heating_Control git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8480 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_Heating_Control.pm | 7 +++++-- FHEM/98_WeekdayTimer.pm | 4 ++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/FHEM/98_Heating_Control.pm b/FHEM/98_Heating_Control.pm index c4a2bb53d..34156771c 100644 --- a/FHEM/98_Heating_Control.pm +++ b/FHEM/98_Heating_Control.pm @@ -93,9 +93,12 @@ sub Heating_Control_SetTimerOfDay($) { sub Heating_Control_Attr($$$) { my ($cmd, $name, $attrName, $attrVal) = @_; - if( $attrName eq "disable" ) { - my $hash = $defs{$name}; + my $hash = $defs{$name}; + if( $attrName eq "disable" ) { readingsSingleUpdate ($hash, "disabled", $attrVal, 1); + } elsif ( $attrName eq "switchInThePast" ) { + $attr{$name}{$attrName} = $attrVal; + Heating_Control_SetTimerOfDay({ HASH => $hash}); } return undef; } diff --git a/FHEM/98_WeekdayTimer.pm b/FHEM/98_WeekdayTimer.pm index d30be856e..bea6c27a4 100644 --- a/FHEM/98_WeekdayTimer.pm +++ b/FHEM/98_WeekdayTimer.pm @@ -493,7 +493,7 @@ sub WeekdayTimer_SetTimer($) { if ($secondsToSwitch>$grenzSeconds && !$switchedInThePast) { if ($secondsToSwitch>0 || $isActiveTimer) { - Log3 $hash, 4, "[$name] timer seems to be active today: ".join("",@$tage)."|$time|$nextPara" if($isActiveTimer); + Log3 $hash, 4, "[$name]:setTimer - timer seems to be active today: ".join("",@$tage)."|$time|$nextPara" if($isActiveTimer); myInternalTimer ("$time", $timToSwitch, "$hash->{TYPE}_Update", $hash, 0); my ($stunde, $minute, $sekunde) = split (":",$nextSwitch); @@ -535,7 +535,7 @@ sub WeekdayTimer_Update($) { my $active = 1; $active = WeekdayTimer_isAnActiveTimer ($hash, $tage, $newParam); - Log3 $hash, 4, "[$name] timer seems to be active today: ".join("",@$tage)."|$time|$newParam" if($active); + Log3 $hash, 4, "[$name]:Update - timer seems to be active today: ".join("",@$tage)."|$time|$newParam" if($active); # ggf. Device schalten WeekdayTimer_Device_Schalten($hash, $newParam, $tage);