Skip to content

Commit d5176f5

Browse files
committed
[verisure] Fix switch fall-through in event log getValue
Address Copilot review comment on #20353. CHANNEL_LAST_EVENT_TIME fell through into CHANNEL_LAST_EVENT_DEVICE_TYPE, which returned the device type label. As a result, getValue(CHANNEL_LAST_EVENT_TIME, ...) could update the timestamp channel with the wrong state when eventTime was null and updateTimeStamp(...) was skipped. Add an explicit return for CHANNEL_LAST_EVENT_TIME so the side-effect call to triggerEventChannels still runs but no incorrect state is returned. The actual timestamp value is set by the subsequent updateTimeStamp call in updateEventLogState when eventTime is non-null. Signed-off-by: Jan Gustafsson <jannegpriv@gmail.com>
1 parent 6477d08 commit d5176f5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

bundles/org.openhab.binding.verisure/src/main/java/org/openhab/binding/verisure/internal/handler/VerisureEventLogThingHandler.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ public State getValue(String channelId, VerisureEventLogDTO verisureEventLog, Ev
128128
if (lastEventTime != 0) {
129129
triggerEventChannels(eventLog);
130130
}
131+
return UnDefType.UNDEF;
131132
case CHANNEL_LAST_EVENT_DEVICE_TYPE:
132133
Gui gui = device != null ? device.getGui() : null;
133134
String label = gui != null ? gui.getLabel() : null;

0 commit comments

Comments
 (0)