Automation trigger on group of sensors AND sent specific triggering sensor in notification SO CLOSE

So doubled checked. Control panel is disarmed
pasting {{ states(‘alarm_control_panel.alarm’) != ‘disarmed’ }} returns true
pasting “{{ states.alarm_control_panel.alarm.state != ‘disarmed’ }}” returns true

entity_id is alarm_control_panel.home_alarm

{{ states('alarm_control_panel.home_alarm') != 'disarmed' }}

Thats works. Now I’ll study the small difference in the code to actually try to understand what you just did :slight_smile:

Thanks mate

His shortened message works as I have it throughout my config. I have a feeling it is a case mismatch on the group.

  message: "{{ expand('group.Door_sensors') | selectattr('state', 'eq', 'on) | map(attribute='name') | list | join(', ') | upper }} opened"
1 Like

It works for me so you must have done something wrong. :man_shrugging:

Your previous message quoted the Template Condition I posted and then proceeded to discuss a completely different Template Condition. Was there a question and was it meant for me?

An entity_id is a slug (meaning a string that has no whitespace or non-ASCII characters and is in lower-case). Given that format, I don’t see how the group’s entity_id could contain upper-case letters.

@Marcweemer
The entity’s entity_id is shown in Developer Tools > States and that’s what should be used when referencing it in templates, scripts, automations, etc.