mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-07 16:59:18 +00:00
process events only if visible in browser
git-svn-id: https://svn.fhem.de/fhem/trunk@4485 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
676b887d7e
commit
4715458c01
@ -1,6 +1,7 @@
|
||||
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
|
||||
# Do not insert empty lines here, update check depends on it.
|
||||
- SVN
|
||||
- feature: readingsGroup: process events only if visible in browser
|
||||
- feature: FLOORPLAN: Style4 (S300TH specific) now keeps its formatting
|
||||
even with longpoll; Text "desiredTemperature" will now
|
||||
be eliminated - for MAX devices.
|
||||
|
@ -437,6 +437,11 @@ readingsGroup_detailFn()
|
||||
{
|
||||
my ($FW_wname, $d, $room, $pageHash) = @_; # pageHash is set for summaryFn.
|
||||
|
||||
my $hash = $defs{$d};
|
||||
|
||||
Log3 $hash->{NAME}, 5, "opened: $FW_cname";
|
||||
$hash->{helper}->{myDisplay}->{$FW_cname} = 1;
|
||||
|
||||
return readingsGroup_2html($d);
|
||||
}
|
||||
|
||||
@ -457,6 +462,30 @@ readingsGroup_Notify($$)
|
||||
|
||||
return if( AttrVal($name,"disable", 0) > 0 );
|
||||
|
||||
if( !defined($hash->{helper}{myDisplay})
|
||||
|| !%{$hash->{helper}{myDisplay}} ) {
|
||||
Log3 $name, 5, "$name: not on any display, ignoring notify";
|
||||
return undef;
|
||||
} else {
|
||||
foreach my $display ( keys %{$hash->{helper}{myDisplay}} ) {
|
||||
if( defined($defs{$display}) ) {
|
||||
my $filter = $defs{$display}->{inform};
|
||||
my $rn = AttrVal($name, "room", "");
|
||||
if($filter eq "all" || $rn =~ m/\b$filter\b/) {
|
||||
Log3 $name, 5, "$name: do update";
|
||||
} else {
|
||||
Log3 $name, 5, "$name: $display is not my room, ignoring notify";
|
||||
delete( $hash->{helper}{myDisplay}{$display} );
|
||||
return undef;
|
||||
}
|
||||
} else {
|
||||
Log3 $name, 5, "$name: $display is closed, ignoring notify";
|
||||
delete( $hash->{helper}{myDisplay}{$display} );
|
||||
return undef;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return if($dev->{TYPE} eq $hash->{TYPE});
|
||||
#return if($dev->{NAME} eq $name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user