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
This commit is contained in:
dietmar63 2015-04-25 20:24:29 +00:00
parent 8e90d4bc35
commit e7cef9c40e
2 changed files with 7 additions and 4 deletions

View File

@ -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;
}

View File

@ -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);