From c705a26e614e6befebf6115206c44b48d64fa514 Mon Sep 17 00:00:00 2001 From: Beta-User <> Date: Mon, 16 Dec 2019 20:12:11 +0000 Subject: [PATCH] 98_WeekdayTimer: prevent log entries at startup, forum #106330 git-svn-id: https://svn.fhem.de/fhem/trunk@20766 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/98_WeekdayTimer.pm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/fhem/FHEM/98_WeekdayTimer.pm b/fhem/FHEM/98_WeekdayTimer.pm index e53069260..ee9ec0fc3 100644 --- a/fhem/FHEM/98_WeekdayTimer.pm +++ b/fhem/FHEM/98_WeekdayTimer.pm @@ -22,7 +22,7 @@ # You should have received a copy of the GNU General Public License # along with fhem. If not, see . # -#################################we############################################# +############################################################################## ############################################################################## package main; use strict; @@ -70,6 +70,7 @@ sub WeekdayTimer_Define($$) { $hash->{NAME} = $name; $hash->{DEVICE} = $device; + my $language = WeekdayTimer_Language ($hash, \@a); InternalTimer(time(), "WeekdayTimer_Start",$hash,0); @@ -1175,17 +1176,17 @@ sub WeekdayTimer_Attr($$$$) { $attrVal = 0 if(!defined $attrVal); my $hash = $defs{$name}; - if( $attrName eq "disable" ) { + if( $attrName eq "disable" ) { readingsSingleUpdate ($hash, "disabled", $attrVal, 1); WeekdayTimer_SetTimerOfDay({ HASH => $hash}) unless $attrVal; } elsif ( $attrName eq "enable" ) { - WeekdayTimer_SetTimerOfDay({ HASH => $hash}); + WeekdayTimer_SetTimerOfDay({ HASH => $hash}) if $init_done; } elsif ( $attrName eq "weekprofile" ) { $attr{$name}{$attrName} = $attrVal; WeekdayTimer_Start($hash) if $init_done; - } elsif ( $attrName eq "switchInThePast" ) { + } elsif ( $attrName eq "switchInThePast" ) { $attr{$name}{$attrName} = $attrVal; - WeekdayTimer_SetTimerOfDay({ HASH => $hash}); + WeekdayTimer_SetTimerOfDay({ HASH => $hash}) if $init_done; } return undef; }