Automation issue - Home/leave

I created an automation that sends a notification if I leave from home and if windows status is “open” I’m using iphone XR and i have HA mobile application. The mobile HA software has constant access to my location and background app update is on But still when i leave home my automation doesn’t work. If I open the mobile application, the notification will be sent and my location will be updated. Do I have to open the mobile application so that it can understand that I left the house? I can receive instant mobile notifications for my other automations, no problem. However, for some reason, I could not successfully run an automation that would work when I left the house. What am I doing wrong?

Below is the automation I use

alias: Example
description: ''
trigger:
  - platform: state
    entity_id: person.okan
    to: not_home
condition:
  - condition: or
    conditions:
      - condition: state
        entity_id: binary_sensor.salon_pencere_sensoru_pencere
        state: 'on'
action:
  - service: notify.mobile_app_okan_iphone
    data:
      message: Test
mode: single

In the companion app settings, what does the configuration of your location settings look like? It sounds like your app is only updating your location when you open the app.

1 Like

No, I specifically changed that. Currently this app is set to always access location. I can also see the sign that you are using my location on the home screen

For reference, talking about this setting page in the app, not the iOS settings.

This is how mine is setup and my home/away alerts work well.

1 Like

it looks like this. By the way, i checked “Person” on the web interface, it was still “away” but i’m at home during 2 hours. When i login the mobile software it’s updated.

By the way, are you using nabu case etc, vpn etc? I mean for this automation it’s needed?