mirror of
https://github.com/danieldemus/openhab-core.git
synced 2025-01-10 13:21:53 +01:00
RulesDSL: add DateTimeTrigger offset (#4272)
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
This commit is contained in:
parent
83b069d970
commit
bcda209ec9
@ -393,6 +393,7 @@ public class DSLRuleProvider
|
||||
Configuration cfg = new Configuration();
|
||||
cfg.put("itemName", tt.getItem());
|
||||
cfg.put("timeOnly", tt.isTimeOnly());
|
||||
cfg.put("offset", tt.getOffset());
|
||||
return TriggerBuilder.create().withId(Integer.toString((triggerId++))).withTypeUID("timer.DateTimeTrigger")
|
||||
.withConfiguration(cfg).build();
|
||||
} else if (t instanceof EventEmittedTrigger eeTrigger) {
|
||||
|
@ -76,7 +76,7 @@ TimerTrigger:
|
||||
;
|
||||
|
||||
DateTimeTrigger:
|
||||
'Time' 'is' item=ItemName (timeOnly?='timeOnly')?
|
||||
'Time' 'is' item=ItemName (timeOnly?='timeOnly')? ('offset' offset=INT)?
|
||||
;
|
||||
|
||||
SystemTrigger:
|
||||
|
Loading…
Reference in New Issue
Block a user