How to specify which device from a group changed state in a notification?

Tags: #<Tag:0x00007f7399303ec8> #<Tag:0x00007f7399303e00>

Hi guys!

I have a simple automated notification that triggers when a person state changes to ‘not_home’ and if the group of all devices is ‘on’. This helps me know that I left something ‘on’ after leaving home.

However, I was trying to customize that notification making it dynamic by saying which device was left ‘on’, but I’m struggling a bit on this.

Any ideas?

Thanks in advance

The trigger state object might hold the information you need,see

Maybe you want something like

{{ trigger.entity_id }}


{{ state_attr(trigger.entity_id, 'friendly_name') }}