Using "Member of" trigger in UI DSL rules: is triggeringitem still available?

  • Platform information:
    • Hardware: Raspberry pi4
    • OS: openhabian, OH 3.4.1

How can I convert to a UI based rule the following rule?

rule "UPS Notify Blackout"
when
	Member of gUPSOFFLINE changed 
then
    val telegramAction = getActions("telegram","telegram:telegramBot:OpenHAB_Bot")
    val itm=triggeringItem
    if ((previousState != UNDEF) && (itm.state != UNDEF)) {
    	telegramAction.sendTelegram("stato "+itm.name+" from "+previousState+" to "+itm.state)
	}
end

For this particular case I can easily write two rules, one for each member of the group, but I do have some other cases with groups with more members.

I can still use the rules files but I would like to figure out if the “member of” trigger (and the corresponding triggeringItem) is obsolete (and how to replace it) or if it is something that will be implemented in the future.

Thank you for your attention

It should be but if not there will be a triggeringItemName. I forget when one is available and when the other one is available but that’s covered in the Implicit Variables section of the Rules docs.

triggeringItem is available when the Trigger is Member of an is afaik a genericItem object, while
triggeringItemName is available for the Trigger Item and is a string object.

Thank you all for your kind answers. I overlooked that there was a menu allowing to change the kind of trigger.

I was wrongly remembering to have read in some thread that Implicit variables were not available in DSL rules implemented in the UI. The limitation probably is that in UI it is not possible to define a variable outside the rules that keeps its value between different runs.