mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[zoneminder] Only update state options if they've changed (#11463)
* Only update state options if they've changed Signed-off-by: Mark Hilbush <mark@hilbush.com> * Fix update of state options Signed-off-by: Mark Hilbush <mark@hilbush.com>
This commit is contained in:
parent
28fb126754
commit
edd3e01c64
@ -318,11 +318,12 @@ public class ZmBridgeHandler extends BaseBridgeHandler {
|
||||
monitorList.add(monitor);
|
||||
options.add(new StateOption(monitorDTO.id, "Monitor " + monitorDTO.id));
|
||||
}
|
||||
stateDescriptionProvider
|
||||
.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_IMAGE_MONITOR_ID), options);
|
||||
stateDescriptionProvider
|
||||
.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_VIDEO_MONITOR_ID), options);
|
||||
}
|
||||
// Update state options
|
||||
stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_IMAGE_MONITOR_ID),
|
||||
options);
|
||||
stateDescriptionProvider.setStateOptions(new ChannelUID(getThing().getUID(), CHANNEL_VIDEO_MONITOR_ID),
|
||||
options);
|
||||
// Only update alarm and event info for monitors whose handlers are initialized
|
||||
Set<String> ids = monitorHandlers.keySet();
|
||||
for (Monitor m : monitorList) {
|
||||
|
Loading…
Reference in New Issue
Block a user