2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_WeekdayTimer.pm: fix some more warnings, forum #112014

git-svn-id: https://svn.fhem.de/fhem/trunk@22411 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Beta-User 2020-07-16 20:13:23 +00:00
parent 533d5ef629
commit 3e136b9290

View File

@ -1166,7 +1166,7 @@ sub WeekdayTimer_Switch_Device {
'set $NAME '. $setModifier .' $EVENT' if (!defined $attr{$name}{commandTemplate});
$command = AttrVal($hash->{NAME}, "commandTemplate", "commandTemplate not found");
$command = $hash->{COMMAND} if ($hash->{COMMAND} ne "");
$command = $hash->{COMMAND} if defined $hash->{COMMAND} && $hash->{COMMAND} ne "";
my $activeTimer = 1;
@ -1215,7 +1215,7 @@ sub WeekdayTimer_Condition {
Log3( $hash, 4, "[$name] condition:$hash->{CONDITION} - Tage:".join(",",@$tage) );
my $condition = "( ";
$condition .= ($hash->{CONDITION} ne "") ? $hash->{CONDITION} : 1 ;
$condition .= (defined $hash->{CONDITION} && $hash->{CONDITION} ne "") ? $hash->{CONDITION} : 1 ;
$condition .= " && " . WeekdayTimer_TageAsCondition($tage, $overrulewday);
$condition .= ")";