ccutrer / openhab-jrubyscripting

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

fix changed duration when only from state is given #156

Closed jimtng closed 1 year ago

jimtng commented 1 year ago

The bug: changed(NumberItem1, from: 1, for: 5.minutes) didn't work when item changed from 1 -> 2 -> 3. It should still trigger, because technically it has changed from 1 and hasn't reverted back to 1.

Compare it with a non duration trigger changed(NumberItem1, from: 1) which will cause a trigger when it changed from 1 admittedly the subsequent changes are irrelevant because of the instantaneous nature of the trigger.