Get Attribute of Device Triggering the Event

I have a rule that contains multiple devices (switches) that could trigger the the Actions when the "ON" event occurs. Within the Actions I would like to assign a variable to a specific attribute of the device that triggered the event. While the option to assign a variable to a device attribute is there, one must select the device(i.e. vSiren_Cuckoo) . The resulting statement then would be:
Set soundNum to vSiren_Cuckoo soundNumber

This wont work for me because I do not know which device has/will trigger the on event. What I need for this rule might look something like:
Set soundNum to %device.attributeName%
I hope this makes sense and ask if this possible in RM or do I have to develop my own groovy app?

RM doesn't handle this case.

Maybe this helps:

ie you can write generic code to deal with many different devices / attributes / values

1 Like

I meant to respond when you first posted this question, by suggesting a series of simple conditionals of this form:

The 'trick' here is capturing the triggering Device into a local RM variable, to test against. You could have multiple IF-THEN's to account for each possible Trigger Event.