mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 13:21:53 +01:00
Add offset and timeOnly config in TimerEvent payload (#4378)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
parent
92f5baea10
commit
3c7b4b89b1
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user