2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-02-01 07:19:24 +00:00

98_DOIF.pm: fixed: attribute was not set when defmod is redefined if no def was set, collect data for card are no longer deleted when defmod is redefined

git-svn-id: https://svn.fhem.de/fhem/trunk@25711 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Damian 2022-02-20 09:18:05 +00:00
parent 9630724460
commit b9eecaae20

View File

@ -77,7 +77,7 @@ sub DOIF_delAll($)
delete ($hash->{perlblock});
delete ($hash->{var});
delete ($hash->{accu});
delete ($hash->{collect});
#delete ($hash->{collect});
delete ($hash->{Regex});
delete ($hash->{defs});
@ -3624,10 +3624,8 @@ CmdDoIf($$)
$hash->{helper}{sleeptimer}=-1;
return("","") if ($tail =~ /^ *$/);
if ($tail !~ /^ *$/) {
$tail =~ s/\n/ /g;
while ($tail ne "") {
return($tail, "no left bracket of condition") if ($tail !~ /^ *\(/);
#condition
@ -3695,7 +3693,7 @@ CmdDoIf($$)
}
$hash->{do}{$last_do+1}{0}=$else_cmd_ori if ($j==0); #doelse without brackets
}
}
if ($init_done) {
foreach my $key (keys %{$attr{$hash->{NAME}}}) {
if ($key ne "disable" and AttrVal($hash->{NAME},$key,"")) {