This is very similar to the official notify_leaving_zone
but for entering zones. I just switched != and == around.
Edit: I made this because I already have zone entering notifications, so I had no use for the official leave zone notification. But after some testing it seems like the official one doesn’t work for me, and neither does this one.
Get started
Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)
blueprint:
name: Zone Entering Notification
description: Send a notification to a device when a person enters a specific zone.
domain: automation
input:
person_entity:
name: Person
selector:
entity:
domain: person
zone_entity:
name: Zone
selector:
entity:
domain: zone
notify_device:
name: Device to notify
description: Device needs to run the official Home Assistant app to receive notifications.
selector:
device:
integration: mobile_app
trigger:
platform: state
entity_id: !input person_entity
variables:
zone_entity: !input zone_entity
# This is the state of the person when it's in this zone.
zone_state: "{{ states[zone_entity].name }}"
person_entity: !input person_entity
person_name: "{{ states[person_entity].name }}"
condition:
condition: template
value_template: "{{ trigger.from_state.state != zone_state and trigger.to_state.state == zone_state }}"
action:
domain: mobile_app
type: notify
device_id: !input notify_device
message: "{{ person_name }} has entered {{ zone_state }}"