From 66939a2e98990389acf2373e2132fe18ea12c62d Mon Sep 17 00:00:00 2001 From: Wietse van Buitenen Date: Sat, 11 Jul 2020 11:46:07 +0200 Subject: [PATCH] [melcloud] List devices on all levels Signed-off-by: Wietse van Buitenen --- .../binding/melcloud/internal/api/MelCloudConnection.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/api/MelCloudConnection.java b/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/api/MelCloudConnection.java index 4cd6668073720..f871d6d61458b 100644 --- a/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/api/MelCloudConnection.java +++ b/bundles/org.openhab.binding.melcloud/src/main/java/org/openhab/binding/melcloud/internal/api/MelCloudConnection.java @@ -106,6 +106,11 @@ public List fetchDeviceList() throws MelCloudCommException { if (building.getStructure().getDevices() != null) { devices.addAll(building.getStructure().getDevices()); } + building.getStructure().getAreas().forEach(area -> { + if (area.getDevices() != null) { + devices.addAll(area.getDevices()); + } + }); building.getStructure().getFloors().forEach(floor -> { if (floor.getDevices() != null) { devices.addAll(floor.getDevices());