From 3cdbad47bad56ee11ceef812e083ab602138b029 Mon Sep 17 00:00:00 2001 From: justme1968 Date: Fri, 26 Feb 2021 08:45:59 +0000 Subject: [PATCH] 30_HUEBridge.pm: honor ignoreReachable in createGroupReadings git-svn-id: https://svn.fhem.de/fhem/trunk@23829 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/30_HUEBridge.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/30_HUEBridge.pm b/fhem/FHEM/30_HUEBridge.pm index c8192c9ff..285980b03 100644 --- a/fhem/FHEM/30_HUEBridge.pm +++ b/fhem/FHEM/30_HUEBridge.pm @@ -1315,7 +1315,8 @@ HUEBridge_updateGroups($$) foreach my $light ( split(',', $chash->{lights}) ) { next if( !$light ); next if( !defined($modules{HUEDevice}{defptr}{"$name-$light"}) ); - my $current = $modules{HUEDevice}{defptr}{"$name-$light"}{helper}; + my $lhash = $modules{HUEDevice}{defptr}{"$name-$light"}; + my $current = $lhash->{helper}; next if( !$current ); #next if( !$current->{on} ); next if( $current->{helper}{devtype} ); @@ -1367,7 +1368,10 @@ HUEBridge_updateGroups($$) $readings{sat} += $current->{sat} if( defined($current->{sat}) ); $readings{on} |= ($current->{on}?'1':'0'); - $readings{reachable} |= ($current->{reachable}?'1':'0'); + + if( !AttrVal($lhash->{NAME}, 'ignoreReachable', 0) ) { + $readings{reachable} |= ($current->{reachable}?'1':'0'); + } if( !defined($readings{alert}) ) { $readings{alert} = $current->{alert};