From 53589abb551994a21f62e1db6ef3ce0865ef6878 Mon Sep 17 00:00:00 2001 From: Mark Herwege Date: Mon, 2 Sep 2024 15:36:00 +0200 Subject: [PATCH] fix basic alarm 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 ef3311ddeaacc..353ed0ad6a5c6 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 @@ -385,7 +385,8 @@ private void addDevice(NhcDevice2 device) { 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); @@ -406,6 +407,7 @@ private void addActionDevice(NhcDevice2 device, @Nullable String location) { case "pir": case "simulation": case "comfort": + case "alarms": case "alloff": case "overallcomfort": case "garagedoor":