From 3c7b4b89b188a513fd07287f4a887c34fbc6d5d5 Mon Sep 17 00:00:00 2001 From: jimtng <2554958+jimtng@users.noreply.github.com> Date: Mon, 16 Sep 2024 05:20:29 +1000 Subject: [PATCH] Add offset and timeOnly config in TimerEvent payload (#4378) Signed-off-by: Jimmy Tanagra --- .../internal/module/handler/DateTimeTriggerHandler.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/DateTimeTriggerHandler.java b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/DateTimeTriggerHandler.java index ad348263c..71bc3eb51 100644 --- a/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/DateTimeTriggerHandler.java +++ b/bundles/org.openhab.core.automation/src/main/java/org/openhab/core/automation/internal/module/handler/DateTimeTriggerHandler.java @@ -123,7 +123,8 @@ public class DateTimeTriggerHandler extends BaseTriggerModuleHandler ModuleHandlerCallback callback = this.callback; if (callback instanceof TriggerHandlerCallback triggerHandlerCallback) { TimerEvent event = AutomationEventFactory.createTimerEvent(module.getTypeUID(), - Objects.requireNonNullElse(module.getLabel(), module.getId()), Map.of(CONFIG_ITEM_NAME, itemName)); + Objects.requireNonNullElse(module.getLabel(), module.getId()), + Map.of(CONFIG_ITEM_NAME, itemName, CONFIG_TIME_ONLY, timeOnly, CONFIG_OFFSET, offset)); triggerHandlerCallback.triggered(module, Map.of("event", event)); } else { logger.debug("Tried to trigger, but callback isn't available!");