mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-07 22:29:19 +00:00
98_WeekdayTimer: prevent log entries at startup, forum #106330
git-svn-id: https://svn.fhem.de/fhem/trunk@20766 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ac0ef6c298
commit
c705a26e61
@ -22,7 +22,7 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
# along with fhem. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
#################################we#############################################
|
##############################################################################
|
||||||
##############################################################################
|
##############################################################################
|
||||||
package main;
|
package main;
|
||||||
use strict;
|
use strict;
|
||||||
@ -70,6 +70,7 @@ sub WeekdayTimer_Define($$) {
|
|||||||
|
|
||||||
$hash->{NAME} = $name;
|
$hash->{NAME} = $name;
|
||||||
$hash->{DEVICE} = $device;
|
$hash->{DEVICE} = $device;
|
||||||
|
my $language = WeekdayTimer_Language ($hash, \@a);
|
||||||
|
|
||||||
InternalTimer(time(), "WeekdayTimer_Start",$hash,0);
|
InternalTimer(time(), "WeekdayTimer_Start",$hash,0);
|
||||||
|
|
||||||
@ -1175,17 +1176,17 @@ sub WeekdayTimer_Attr($$$$) {
|
|||||||
$attrVal = 0 if(!defined $attrVal);
|
$attrVal = 0 if(!defined $attrVal);
|
||||||
|
|
||||||
my $hash = $defs{$name};
|
my $hash = $defs{$name};
|
||||||
if( $attrName eq "disable" ) {
|
if( $attrName eq "disable" ) {
|
||||||
readingsSingleUpdate ($hash, "disabled", $attrVal, 1);
|
readingsSingleUpdate ($hash, "disabled", $attrVal, 1);
|
||||||
WeekdayTimer_SetTimerOfDay({ HASH => $hash}) unless $attrVal;
|
WeekdayTimer_SetTimerOfDay({ HASH => $hash}) unless $attrVal;
|
||||||
} elsif ( $attrName eq "enable" ) {
|
} elsif ( $attrName eq "enable" ) {
|
||||||
WeekdayTimer_SetTimerOfDay({ HASH => $hash});
|
WeekdayTimer_SetTimerOfDay({ HASH => $hash}) if $init_done;
|
||||||
} elsif ( $attrName eq "weekprofile" ) {
|
} elsif ( $attrName eq "weekprofile" ) {
|
||||||
$attr{$name}{$attrName} = $attrVal;
|
$attr{$name}{$attrName} = $attrVal;
|
||||||
WeekdayTimer_Start($hash) if $init_done;
|
WeekdayTimer_Start($hash) if $init_done;
|
||||||
} elsif ( $attrName eq "switchInThePast" ) {
|
} elsif ( $attrName eq "switchInThePast" ) {
|
||||||
$attr{$name}{$attrName} = $attrVal;
|
$attr{$name}{$attrName} = $attrVal;
|
||||||
WeekdayTimer_SetTimerOfDay({ HASH => $hash});
|
WeekdayTimer_SetTimerOfDay({ HASH => $hash}) if $init_done;
|
||||||
}
|
}
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user