Skip to content

Commit

Permalink
fix basic alarm (#17360)
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
  • Loading branch information
mherwege authored Sep 3, 2024
1 parent 06b361c commit ffa59f8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,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);
Expand All @@ -403,6 +404,7 @@ private void addActionDevice(NhcDevice2 device, @Nullable String location) {
case "pir":
case "simulation":
case "comfort":
case "alarms":
case "alloff":
case "overallcomfort":
case "garagedoor":
Expand Down

0 comments on commit ffa59f8

Please sign in to comment.