From ffa59f8d8fd9f00e18858037112f3159686d967f Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Tue, 3 Sep 2024 17:56:15 +0200 Subject: [PATCH] fix basic alarm (#17360) Signed-off-by: Mark Herwege --- .../internal/protocol/nhc2/NikoHomeControlCommunication2.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NikoHomeControlCommunication2.java b/bundles/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NikoHomeControlCommunication2.java index 47dc3355b8a..d307b859db2 100644 --- a/bundles/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NikoHomeControlCommunication2.java +++ b/bundles/org.openhab.binding.nikohomecontrol/src/main/java/org/openhab/binding/nikohomecontrol/internal/protocol/nhc2/NikoHomeControlCommunication2.java @@ -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":