Skip to content

Commit

Permalink
RulesDSL: add DateTimeTrigger offset (#4272)
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Tanagra <jcode@tanagra.id.au>
  • Loading branch information
jimtng authored Sep 10, 2024
1 parent 83b069d commit bcda209
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ private String removeIndentation(String script) {
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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ TimerTrigger:
;

DateTimeTrigger:
'Time' 'is' item=ItemName (timeOnly?='timeOnly')?
'Time' 'is' item=ItemName (timeOnly?='timeOnly')? ('offset' offset=INT)?
;

SystemTrigger:
Expand Down

0 comments on commit bcda209

Please sign in to comment.