boc-tothefuture / openhab-jruby

JRuby Libraries for Openhab
Eclipse Public License 2.0
6 stars 9 forks source link

Support DateTimeTrigger #590

Closed jimtng closed 2 years ago

jimtng commented 2 years ago

This just got merged to core: https://github.com/openhab/openhab-core/pull/2923

A trigger that creates a cron schedule based on the date+time in a DateTimeItem. It changes its schedule as the item's state changes.

What would be a good name for the trigger? datetime ?

Or every can take a DateTimeItem and create this trigger?

Of course we can also just use the existingtrigger which is probably the easiest thing to do.

rule 'x' do
  trigger 'timer.DateTimeTrigger', itemName: DateTime_Item.name
  ...
end