mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
01_FHEMWEB.pm: fix wrong FHEMWEB notification (Forum #51102)
git-svn-id: https://svn.fhem.de/fhem/trunk@11103 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8e751330e7
commit
9f0f38c83d
@ -2559,6 +2559,13 @@ FW_Notify($$)
|
||||
if($events) { # It gets deleted sometimes (?)
|
||||
my $tn = TimeNow();
|
||||
my $max = int(@{$events});
|
||||
|
||||
my $state = "";
|
||||
if($max) {
|
||||
my ($rn,$rv) = split(": ",$events->[$max-1],2);
|
||||
$state = $rv if($rn eq "state");
|
||||
}
|
||||
|
||||
for(my $i = 0; $i < $max; $i++) {
|
||||
if($events->[$i] !~ /: /) {
|
||||
if($dev->{NAME} eq 'global') { # Forum #47634
|
||||
@ -2569,6 +2576,7 @@ FW_Notify($$)
|
||||
|
||||
next; #ignore 'set' commands
|
||||
}
|
||||
next if($events->[$i] eq $state);
|
||||
my ($readingName,$readingVal) = split(": ",$events->[$i],2);
|
||||
push @data, FW_longpollInfo($h->{fmt},
|
||||
"$dn-$readingName", $readingVal,$readingVal);
|
||||
|
Loading…
x
Reference in New Issue
Block a user