Are there plans to support item update events for JSR223 rules (vs. only change events)? I see there is some support for it in the RuleTriggerManager but there’s no trigger class for it. Was there an issue with supporting item update triggers in the rules?
If I remember correctly, you can use the ChangeEventTrigger as an Update-Trigger with ChangeEventTrigger(“Item-Name”, null, null)
I saw that ChangeEventTrigger will match an update. However, the trigger is not recorded in the update-related trigger set so it is not evaluated when an update event occurs.
oh you are right…
There is no particular reason to not support it…one just need to add the Trigger class and add an if-clause to “addRule”.
Just for my interest, what kind of script does really need to listen for simple updates instead of changes?
Yes, it should be easy to add. Most of the implementation is there already. I’ll create a PR for the change.
I agree that most scripts will use the ChangedEventTrigger. Some rules might do calculations based on updates rather than changes. For example, they may tracking the frequency of an external update. It might also be useful to have an “tickler” item that triggers rules any time it is updated, regardless of the value.