Hi, @xman111 - here’s a possibility to consolidate things a bit.
First, create a notification group - then all you need to do is notify the group instead of each person individually. Place the following in your configuration.yaml
under notify:
(or in your notifications.yaml
file if you are using that) and, unfortunately, there isn’t a reload for notifications so you have to re-start (unless someone else knows an easier method):
- platform: group
name: family_devices
services:
- service: mobile_app_richelles_s10_mobile_app
- service: mobile_app_craigs_s20_mobile_app
Ref for notify groups: Notify Group - Home Assistant (home-assistant.io)
Then, in the automation, structure it like this:
- alias: Zone Notifications
trigger:
- platform: zone
entity_id:
- device_tracker.person_one
- device_tracker.person_two
- device_tracker.person_three
zone: zone.home
event: enter
- platform: zone
entity_id:
- device_tracker.person_one
- device_tracker.person_two
- device_tracker.person_three
zone: zone.home
event: leave
- platform: zone
entity_id:
- device_tracker.person_one
- device_tracker.person_two
- device_tracker.person_three
zone: zone.school
event: enter
- platform: zone
entity_id:
- device_tracker.person_one
- device_tracker.person_two
- device_tracker.person_three
zone: zone.school
event: leave
action:
- service: notify.family_devices
data:
message: >
{% if trigger.event == "leave" %}
{{ trigger.from_state.attributes.friendly_name }} left {{ trigger.zone.attributes.friendly_name }}
{% else %}
{{ trigger.from_state.attributes.friendly_name }} entered {{ trigger.zone.attributes.friendly_name }}
{% endif %}
I used two “pairings” in the automation - one for home
and one for school
. You can copy/paste those to add more zones to the automation. I can’t find where these can be combined together into something like this that simplifies it even further (maybe a future update will address it):
zone:
- zone.home
- zone.school
The action
section is then the service
call to the group you set up in the notify:
section of your config file. The template in the data
section simply pulls the info from the trigger.event
and the trigger.entity_id
. Note that the template is generic and shouldn’t need to change when you had more zones to the trigger section.
Coming clean: I wasn’t able to test this completely, but it does pass the configuration check… 
Let me know if you run into issues!