Closed jimtng closed 3 years ago
Update: it seems that it works (i.e. event.item exists) if the trigger is changed
but not when it's updated
Relevant: https://community.openhab.org/t/triggeringitem-in-jsr223-scripts-undefined/112637/4
So it seems that we need to check if event.item exists. If it doesn't, can we "patch" the event object to include 'item' from inputs.triggeringItem? Not sure how to do that in Ruby.
Closed by #113
It seems that for group triggers, the run execution block event doesn't have the event.item instance variable.
Code:
This will cause an exception error
Could we make it consistent and add
event.item
even for group triggers? Usingtriggered
works.