@toot4fun wrote:
Is it possible to get the (friendly) name for a sensor that triggers a condition when using groups in the entity_id? As you can see below, I’m using group.all_doors so that I don’t have to make code changes if I add sensors, but in my messaging, I’d like to be able to say that a particular sensor (Front Door, for example) is the door that actually triggered the automation.
automations.yaml
- id: automation.alarm_entry_doors_always alias: Alarm - Entry Doors - Always description: Triggers when alarm is armed and an entry door is opened any time. trigger: - entity_id: group.all_doors from: 'off' platform: state to: 'on' condition: [] action: - service: script.turn_on entity_id: script.alarm_triggered data: variables: title: Home Alarm automation_name: automation.alarm_entry_doors_always automation_friendly_name: Alarm - Entry Doors - Always alarm_delay_seconds: 30 triggered_by: [this is where I'd like to get "Front Door" or "Sliding Door" and not just the name of the group of doors that I have created]
Posts: 3
Participants: 2