Zone automation for every person that I add

Hello,

I am not sure if I am fallowing good path and I think I could get some advice.
My aim: at any zone change for every person added to HA I want to send notification to home speaker and notify.mobile.app of everyone except for the person that has triggered automation (I am assuming they will be conscious and they will know that they are changing zone - so why bother getting notification).

Additionally I want to limit doing anything with this automation so there will be only need to add person to HA and slightly modify automation(*).

alias: Powiadomienie o zmianie strefy
description: ""
trigger:
  - platform: state
    entity_id:
      - person.igor
    id: Igor
  - platform: state
    entity_id:
      - person.kasia
    id: Kasia
condition:
  - condition:
      - condition: template
        value_template: "{{ trigger.from_state.state != trigger.to_state.state  }}"
        alias: Not the same state
action:
  - service: tts.google_translate_say
    data:
      entity_id: media_player.indoorspeaker
      message: >-
        {{ state_attr(trigger.entity_id, 'friendly_name') }} zmiana strefy z {{
        trigger.from_state.state }} na {{ trigger.to_state.state }}
mode: single

and action…
I did only figure out how to call particular mobile app for each person
notify.mobile_app_{{ state_attr('trigger.entity_id, 'source') | string | regex_replace ("device_tracker.","") }}
Things I think I should do now:

  • Iterate trough all persons that are there in HA;
  • make some kind of list (dict) of them;
  • subtract person that is triggering automation from list of people to notify.

Probably overthinking it but I want to have blueprint like template.

I was avoiding templates for some time, so this might just be effect of that. If I will figure something out I will update code.

Edit while writing:
i thik i can avoid that by using should be doable also for trigger:

{% for state in states.person %}
  {{ state.entity_id }}
{% endfor %}