Trying to wrap my brain around how to reference data from the conditions section of an automation. It seems to reference the trigger you can do {{ state_attr(trigger.entity_id, 'friendly_name') }} but I want to reference whichever binary sensor in the coniditional section returned true.
Current yaml:
alias: Bin notification
description: ""
triggers:
- trigger: time
at: "18:30:00"
conditions:
- condition: or
conditions:
- condition: state
entity_id: binary_sensor.refuse_bin_reminder
state: "on"
- condition: state
entity_id: binary_sensor.recycling_bin_reminder
state: "on"
- condition: state
entity_id: binary_sensor.garden_bin_reminder
state: "on"
- condition: state
entity_id: binary_sensor.food_bin_reminder
state: "on"
actions:
- metadata: {}
data:
title: 🗑️ BINS
data:
channel: Bins
notification_icon: mdi:delete-empty
message: "{{ state_attr(trigger.entity_id, 'friendly_name') }}"
action: notify.all_devices
mode: parallel
max: 4