🌐 Zone Notification Extended

You could setup the uptime integration that provides you a sensor. Add a custom condition, maybe a template based:

condition: template
value_template: "{{ states('sensor.uptime') | as_datetime + timedelta(minutes=5) < now() }}"

Edit the uptime entity and the timedelta if necessary.

//EDIT: But maybe this should be integrated in the blueprint.

1 Like

Thanks for pointing me in that direction - I’ll check it out!

1 Like

It looks like this is broken with the last HA update 2025.12.2

I didn’t update yet but will check this. What I can say is that last week I had a device that was no longer sending its location to the server.

//EDIT: still working for me. Check wether you end device / companion app sends the location data to your server. I’d just toggled every location setting in android app settings and companion app settings off and on again for a pixel 8a. Don’t know why it stops reporting. Everything was turned on, restart doesn’t helped. Now it’s working again.

After updating to 2025.12.4 I am getting this trace:

Error in describing trigger: Cannot read properties of undefined (reading ā€˜includes’)

Step Details:

platform: state
entity_id:

  • person.john_doe
    for:
    hours: 0
    minutes: 0
    seconds: 20

Trace Timeline:

Triggered by the state of person.john_doe at December 24, 2025 at 9:33:33 AM
Test If template renders a value equal to true
Stopped because a condition failed at December 24, 2025 at 9:33:33 AM (runtime: 0.00 seconds)

This is my first time posting, hopefully this info is helpful.

Google AI suggested swapping the syntax platform: state for trigger: state as platform: state is a legacy syntax.

Your thoughts?

Could you share a trace log? Just open your automation, click the three dots menu, open trace, navigate to the run with your issue, download and share the log here. Thank you!

My notifications haven’t worked for some time, possibly a month or more. I have run the action for one of my notifications and this was the trace output, I have redacted names with xxx

{
  "trace": {
    "last_step": "action/0",
    "run_id": "9f528a04f0b585f24c41b5e2e21774cf",
    "state": "stopped",
    "script_execution": "error",
    "timestamp": {
      "start": "2026-01-03T09:55:05.195674+00:00",
      "finish": "2026-01-03T09:55:05.213720+00:00"
    },
    "domain": "automation",
    "item_id": "1747674118010",
    "error": "UndefinedError: 'dict object' has no attribute 'entity_id'",
    "trigger": null,
    "trace": {
      "trigger": [
        {
          "path": "trigger",
          "timestamp": "2026-01-03T09:55:05.199385+00:00",
          "changed_variables": {
            "this": {
              "entity_id": "automation.xxx_leaving_home",
              "state": "on",
              "attributes": {
                "id": "1747674118010",
                "last_triggered": "2025-12-30T14:51:49.744070+00:00",
                "mode": "parallel",
                "current": 0,
                "max": 10,
                "friendly_name": "xxx Home"
              },
              "last_changed": "2025-12-28T20:08:46.975867+00:00",
              "last_reported": "2025-12-30T14:51:50.268688+00:00",
              "last_updated": "2025-12-30T14:51:50.268688+00:00",
              "context": {
                "id": "01KDQVWVKAXN1JP4WKSV6X7VWJ",
                "parent_id": "01KDQVWVK9A2HRB69PX0FXW8BB",
                "user_id": null
              }
            },
            "trigger": {
              "platform": null
            },
            "custom_button_arriving_text": "",
            "custom_button_arriving_url": "",
            "zone_inputs": [
              "zone.home"
            ],
            "zones": [
              "zone.home"
            ],
            "home_zone_name": "home",
            "home_zone": "zone.home",
            "not_home": "not_home",
            "zone_names": [
              "home",
              "Home"
            ],
            "zones_leaving": [],
            "zones_leaving_names": [],
            "notify_device": "f3dc496d916ccf1acb014efd43c1bf72",
            "notify_group": "",
            "notify_service": "notify.mobile_app_xxxs_iphone",
            "is_arriving_notification_enabled": true,
            "is_leaving_notification_enabled": true,
            "custom_action_arriving": [],
            "custom_action_leaving": [],
            "critical_notification": false
          }
        }
      ],
      "action/0": [
        {
          "path": "action/0",
          "timestamp": "2026-01-03T09:55:05.202127+00:00",
          "changed_variables": {
            "context": {
              "id": "01KE1MGCBB81E1CNGXSXA98FA2",
              "parent_id": "01KE1MGCBASQB806EQYV2SC5SA",
              "user_id": null
            }
          },
          "error": "UndefinedError: 'dict object' has no attribute 'entity_id'"
        }
      ]
    },
    "config": {
      "variables": {
        "custom_button_arriving_text": "",
        "custom_button_arriving_url": "",
        "zone_inputs": [
          "zone.home"
        ],
        "zones": "{% if zone_inputs | count > 0 %}\n  {{ zone_inputs }}\n{% else %}\n  {{ integration_entities('zone') | default([]) }}\n{% endif %}\n",
        "home_zone_name": "{{ 'home' | lower }}",
        "home_zone": "{{ 'zone.home' | lower }}",
        "not_home": "{{ 'not_home' | lower }}",
        "zone_names": "{% set friendly = namespace(name=[]) %}\n{% for zone in zones %}\n  {% set new_zone = state_attr(zone,'friendly_name') %}\n  {% if home_zone == zone %}\n    {% set friendly.name = friendly.name + [home_zone_name] %}\n  {% endif %}\n  {% set friendly.name = friendly.name + [new_zone.strip()] %}\n{% endfor %}\n\n{{ friendly.name }}\n",
        "zones_leaving": [],
        "zones_leaving_names": "{% set friendly = namespace(name=[]) %}\n{% for zone in zones_leaving %}\n  {% set new_zone = state_attr(zone,'friendly_name') %}\n  {% if home_zone == zone %}\n    {% set friendly.name = friendly.name + [home_zone_name] %}\n  {% endif %}\n  {% set friendly.name = friendly.name + [new_zone.strip()] %}\n{% endfor %}\n\n{{ friendly.name }}\n",
        "notify_device": "f3dc496d916ccf1acb014efd43c1bf72",
        "notify_group": "",
        "notify_service": "{% if(notify_group is defined and notify_group != '' ) %}\n  notify.{{ notify_group }}\n{% elif (notify_device != none and notify_device != '' ) %}\n  notify.mobile_app_{{ device_attr(notify_device, \"name\") | slugify }}\n{% endif %}\n",
        "is_arriving_notification_enabled": true,
        "is_leaving_notification_enabled": true,
        "custom_action_arriving": [],
        "custom_action_leaving": [],
        "critical_notification": false
      },
      "mode": "parallel",
      "triggers": {
        "platform": "state",
        "entity_id": [
          "person.xxx"
        ],
        "for": {
          "hours": 0,
          "minutes": 0,
          "seconds": 0
        }
      },
      "actions": [
        {
          "variables": {
            "person": "{{ state_attr(trigger.entity_id,'friendly_name') }}",
            "zone_from": "{{ iif(trigger.from_state.state | lower != not_home,iif(trigger.from_state.state | lower == home_zone_name,state_attr(home_zone,'friendly_name'),trigger.from_state.state),not_home) }}",
            "zone_to": "{{ iif(trigger.to_state.state | lower != not_home,iif(trigger.to_state.state | lower == home_zone_name,state_attr(home_zone,'friendly_name'),trigger.to_state.state),not_home) }}",
            "notification_color": [
              100,
              200,
              240
            ],
            "notification_color_hex": "

I’ve been having the same issue for about a month, not sure if it will help for anyone else but editing the automation removing the person for the trigger, saving then edit again adding the person back and now I am getting notifications again, although I still get errors on most traces it’s functioning it seems

@iamnotme

You can’t test the automation like this. Have a look into the blueprint description.

@Duck_UK

The automation works flawlessly but I did you check the state of the tracked persons in your history? Also had this problem and this belongs to the companion app:

Thank you, its working as you say flawlessly again since I removed and readded the same person so I am happy either way so not too worried!

I did try toggling the permissions for the companion app but my traces still have ā€œError in describing trigger: Cannot read properties of undefined (reading ā€˜includes’)ā€, I use GPSLogger to provide the location for my People so perhaps I should instead look that way if I get curious.

Either way the actual location tracking and these notifications are firing off happily again, so I’m happy to ignore any errors that aren’t causing any noticible problems. Thank you panhans

1 Like

Hi,
Is there a way to receive the notification only if the person stays in the zone for 2 minutes, and not after a 2-minute delay?
The ā€œdurationā€ setting provides a delay… When I arrive home, I receive the notification 2 minutes later.

Also, when I drive past an area, I receive the notification 2 minutes later.

Thank,

This is the case. The reason why you receive the notification is because the state of your person entity stays for more than 2min for your zones.

Here is the one and only trigger:

trigger:
  platform: state
  entity_id: !input persons
  for: !input duration

You may want to check the settings of the companion app to update the location more frequently, but this could increase battery consumption, or you can increase the duration.

You can simply view the history of your tracked person entity. There you can see how long the status change lasts, even if you were only there briefly.