mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[homeconnect] Ignore disabled things (#12685)
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
This commit is contained in:
parent
b4945f647c
commit
fddfe4e75f
@ -245,13 +245,13 @@ public class HomeConnectBridgeHandler extends BaseBridgeHandler {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get children of bridge
|
||||
* Get children of bridge (disabled things are ignored)
|
||||
*
|
||||
* @return list of child handlers
|
||||
*/
|
||||
public List<AbstractHomeConnectThingHandler> getThingHandler() {
|
||||
return getThing().getThings().stream()
|
||||
.filter(thing -> thing.getHandler() instanceof AbstractHomeConnectThingHandler)
|
||||
.filter(thing -> thing.isEnabled() && thing.getHandler() instanceof AbstractHomeConnectThingHandler)
|
||||
.map(thing -> (AbstractHomeConnectThingHandler) thing.getHandler()).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user