Automation notify which camera motion sensor is active from a multiple entity_ids of a binary_sensor cams motion sensor HA group

I have made a HA group from devices->services->helpers
which is a binary_sensor called binary_sensor.cams_motion_sensors
that contains all my cameras motion sensors binary_sensor.

So when one of these binary_sensor.cameraX_motion_sensor turns to ON
the main binary_sensor.cams_motion_sensors turns ON too.
This last sensor also has the attribute entity_id where are listed all the cameras motion sensors binary_sensor.

I trying to create an automation that has to notify me which camera motion sensor triggered the group of the binary_sensor.cams_motion_sensors.

i tried like so:

alias: Quick notify cams motions sensors
trigger:
  - platform: state
    entity_id:
      - binary_sensor.cams_motion_sensors
    to: 'on'
action:
  - service: notify.persistent_notification
    data:
      title: Motion detected
      message: >-
        A camera has detected a motion -  {{ state_attr("trigger.id",
        "friendly_name") }}
mode: single

Why not just list all the cameras in the triggers, and then your friendly name would be right?

A State Trigger can’t tell you which member of the binary_sensor group was responsible for triggering the automation.

Follow callifo’s suggestion and simply list all the camera binary_sensors directly in the State Trigger. Then, in the action, you can get the name of which one triggered the automation by using trigger.to_state.name.

      message: >-
        A camera has detected a motion -  {{ trigger.to_state.name }}