[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);
|
monitorList.add(monitor);
|
||||||
options.add(new StateOption(monitorDTO.id, "Monitor " + monitorDTO.id));
|
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
|
// Only update alarm and event info for monitors whose handlers are initialized
|
||||||
Set<String> ids = monitorHandlers.keySet();
|
Set<String> ids = monitorHandlers.keySet();
|
||||||
for (Monitor m : monitorList) {
|
for (Monitor m : monitorList) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user