]> git.basschouten.com Git - openhab-addons.git/commitdiff
fix basic alarm (#17360)
authorMark Herwege <mherwege@users.noreply.github.com>
Tue, 3 Sep 2024 15:56:15 +0000 (17:56 +0200)
committerGitHub <noreply@github.com>
Tue, 3 Sep 2024 15:56:15 +0000 (17:56 +0200)
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
bundles/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NikoHomeControlCommunication2.java

index 47dc3355b8aed1eb4588d1e5fcb50eee9163c061..d307b859db2899e55831e6e24807ddd7fe1c4288 100644 (file)
@@ -382,7 +382,8 @@ public class NikoHomeControlCommunication2 extends NikoHomeControlCommunication
             addVideoDevice(device);
         } else if ("accesscontrol".equals(device.model) || "bellbutton".equals(device.model)) {
             addAccessDevice(device, location);
-        } else if ("alarms".equals(device.model)) {
+        } else if ("alarms".equals(device.model) && (device.properties != null)
+                && (device.properties.stream().anyMatch(p -> (p.alarmActive != null)))) {
             addAlarmDevice(device, location);
         } else if ("action".equals(device.type) || "virtual".equals(device.type)) {
             addActionDevice(device, location);
@@ -403,6 +404,7 @@ public class NikoHomeControlCommunication2 extends NikoHomeControlCommunication
             case "pir":
             case "simulation":
             case "comfort":
+            case "alarms":
             case "alloff":
             case "overallcomfort":
             case "garagedoor":