Smoke-detector sensor-group, find the item that triggered

Hey Guys,
I’ve set-up a group of 10 Nest protect smoke-detectors.
Based on this group, whenever one of them is detecting fire, smoke or CO, various actions will be started:

First: I will go crazy :smiley:
Second: My blinds will open (I live in Germany and we have sturdy blinds, that could prevent you from leaving through a window).

Third: A push-message is sent-out to my mobile, with text and TTS-warnings.
Here is where I need help: How do I identify the alarming device? I want the push message to include the room that triggered the warning.

I could do this by adding each and every sensor into the automation and then check its status - but I’d assume there is a more elegant way.
Ideas anyone?

You could try with something like this in developer tools.
Just use developer tools states to set one as on.

{{ expand('group.alarms') | selectattr('state', 'eq', 'on') | list }}

This should give you the friendly name,which you can use in the notification
{{ trigger.to_state.name }}

Edit: I see you’ve set it up in a group, not sure how this would work then… hmm

This will just return the group name.

Yeah i missed that part :confused:

edit:

 {{ ( expand('group.somegroup')
        | sort(reverse=true, attribute='last_changed')
        | map(attribute='name')
        | list )[0] }}

This could potentially be an alarm that went unavailable at the same time as the alarm went off.
But highly unlikely