From b75c6e96f8c9ee78725a2edb652fa4ed30355476 Mon Sep 17 00:00:00 2001 From: Beta-User Date: Tue, 17 Dec 2019 06:12:03 +0000 Subject: [PATCH] 98_WeekdayTimer: prevent log entries at startup (cleanup), forum #106330 git-svn-id: https://svn.fhem.de/fhem/trunk@20769 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_WeekdayTimer.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fhem/FHEM/98_WeekdayTimer.pm b/fhem/FHEM/98_WeekdayTimer.pm index ee9ec0fc3..8741555e2 100644 --- a/fhem/FHEM/98_WeekdayTimer.pm +++ b/fhem/FHEM/98_WeekdayTimer.pm @@ -1172,7 +1172,7 @@ sub WeekdayTimer_TageAsCondition ($$) { ################################################################################ sub WeekdayTimer_Attr($$$$) { my ($cmd, $name, $attrName, $attrVal) = @_; - + return if (!$init_done); $attrVal = 0 if(!defined $attrVal); my $hash = $defs{$name}; @@ -1180,13 +1180,13 @@ sub WeekdayTimer_Attr($$$$) { readingsSingleUpdate ($hash, "disabled", $attrVal, 1); WeekdayTimer_SetTimerOfDay({ HASH => $hash}) unless $attrVal; } elsif ( $attrName eq "enable" ) { - WeekdayTimer_SetTimerOfDay({ HASH => $hash}) if $init_done; + WeekdayTimer_SetTimerOfDay({ HASH => $hash}); } elsif ( $attrName eq "weekprofile" ) { $attr{$name}{$attrName} = $attrVal; - WeekdayTimer_Start($hash) if $init_done; + WeekdayTimer_Start($hash); } elsif ( $attrName eq "switchInThePast" ) { $attr{$name}{$attrName} = $attrVal; - WeekdayTimer_SetTimerOfDay({ HASH => $hash}) if $init_done; + WeekdayTimer_SetTimerOfDay({ HASH => $hash}); } return undef; }