Automation with multiple triggers - How can I specify which trigger in my notification?

So I have an automation that sends me an alert if any of the cameras detect motion at night. However, it only gives me a general “Camera Alert” notification, as I can not figure out how to specify which trigger caused the alert, and I’d rather not have unique automations for each camera. I know there has to be a way to do this!

- id: '1588110079985'
  alias: All Cams Alert Test
  description: ''
  trigger:
  - entity_id: binary_sensor.fdoor_motion
    from: 'off'
    platform: state
    to: 'on'
  - entity_id: binary_sensor.backcam_motion
    from: 'off'
    platform: state
    to: 'on'
  - entity_id: binary_sensor.drivecam_motion
    from: 'off'
    platform: state
    to: 'on'
  - entity_id: binary_sensor.garagecam_motion
    from: 'off'
    platform: state
    to: 'on'
  - entity_id: binary_sensor.north_side_cam_motion
    from: 'off'
    platform: state
    to: 'on'
  condition:
    condition: or
    conditions:
    - after: '21:00'
      before: 05:30
      condition: time
    - condition: state
      entity_id: person.max
      state: not_home
  action:
  - data:
      message: Camera Alert!
     service: notify.slackcam
  action:
  - data_template:
      message: "{{ trigger.to_state.name }} Camera Alert!"
     service: notify.slackcam
1 Like

Thank you @tom_l. Working perfectly.

Now to dig into the templating docs so I can try to learn this myself.