Version 5.27.0 is out!
What’s new:
Features
- Support offset in
at
andevery :day, at:
triggers in #278 - this is a new openHAB 4.3 feature (merged after 4.3.0.M1) - Support space separator between date and time for DateTimeType.parse in #329
Bug Fixes
- DateTimeType implements Java’s Comparable in openHAB 4.3 in #328
- Sitemap updates not propagated to listeners in #327
Full Changelog: v5.26.0…v5.27.0
Example:
Run a rule 30 minutes before the time stored in the My_Daily_Alarm
item:
# This only works in openhab 4.3 post M1.
rule "DateTimeItem trigger" do
every :day, at: My_Daily_Alarm, offset: -30.minutes
run { Audio.play "alarm_prewarning.mp3" }
end
Note: JRuby supports DateTimeItem trigger in two ways:
- To use only the time part of the item, use the every :day, at: Item like the example above.
- To use both the date and time in the item, use the at trigger. Example below:
rule "Birthday trigger" do
at My_Birthday_This_Year, offset: -1.day
run { Notification.send "Don't forget to buy Jim a birthday present!" }
end