Skip to content

Commit

Permalink
[melcloud] List devices on all levels (openhab#8107)
Browse files Browse the repository at this point in the history
Signed-off-by: Wietse van Buitenen <thewiep@gmail.com>
  • Loading branch information
thewiep authored and andrewfg committed Aug 31, 2020
1 parent 55a83fb commit f61d969
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ public List<Device> 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());
Expand Down

0 comments on commit f61d969

Please sign in to comment.