2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-25 22:09:21 +00:00

91_sequence.pm: fix notifyRegxp patch (Forum #113273)

git-svn-id: https://svn.fhem.de/fhem/trunk@22519 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-08-02 11:36:59 +00:00
parent c256e50f07
commit 570468c8ee

View File

@ -44,6 +44,7 @@ sequence_Define($$)
if(int(@def) % 2 == 0 || int(@def) < 3);
# "Syntax" checking
my @reList;
for(my $i = 0; $i < int(@def); $i += 2) {
my $re = $def[$i];
my $to = $def[$i+1];
@ -51,6 +52,7 @@ sequence_Define($$)
return "Bad regexp 1: $@" if($@);
return "Bad timeout spec $to" # timeout or delay:timeout
if (defined($to) && $to !~ m/^(\d+(\.\d+)?:)?\d+(\.\d+)?$/);
push @reList,$re;
}
$hash->{RE} = $def[0];
@ -58,7 +60,7 @@ sequence_Define($$)
$hash->{MAX} = int(@def);
$hash->{STATE} = "active";
$hash->{TS} = 0;
notifyRegexpChanged($hash, $hash->{RE});
notifyRegexpChanged($hash, join("|",@reList));
return undef;
}