Automation trigger on any member of a group, is it possible?

Hi, the topic is quite old, but I had the same problem and I have found a solution without using AppDaemon:

- alias: 'Device updated'
  trigger:
    - platform: event
      event_type: state_changed
  condition:
    - condition: template
      value_template: "{{ trigger.event.data.entity_id in (expand('group.all_devices') | map(attribute='entity_id')) }}"
  action:
    - service: persistent_notification.create
      data_template:
        title: "State changed!"
        message: "{{ state_attr(trigger.event.data.entity_id, 'friendly_name')}}"
        notification_id: 1234
9 Likes