Strange delays in gate opening based on location

I have a strange problem that sometimes there’s a long delay (more then a minute) with opening the gate for the car.
The automation is simple, based on “entering zone” geolocation.

Trigger → When my phone enters a zone
Action → Open the gate

The gate is a nice systems IT4Wifi unit connected via the homekit integration.

What I observed in the logs is that the phone enters zone works fine, it’s fast and accurate , although I see “phone entered zone” 2 or 3 times in the log, not sure if that’s a problem.

What I also see is that the automation fires instant , so firing is fine but then, for no reason, it takes a long time before the gate actually opens (and also not always, but 50% of the time)

I checked quite some things, HA runs on an intel NUC with enough power, but I made sure it’s on performance mode.
I checked networking, wifi, etc… all good…

What is also strange is , if the gate is not opening and I press the “open gate” button manually via HA ui, the gate opens instant.

I have no idea what’s causing this… hope someone has an idea…

this is the automation:

alias: Hek zone regeling
description: ""
triggers:
  - device_id: 8264018fb51e1b47d8871593eafc62b2
    domain: device_tracker
    entity_id: bdb240fce5fdeeca1287d74b795349c3
    type: enters
    trigger: device
    zone: zone.home
  - device_id: 38903fd9e9379183f3e2dbb65732a002
    domain: device_tracker
    entity_id: 0e46b4d27ee4af0cf34f314dcb35b000
    type: enters
    trigger: device
    zone: zone.home
  - device_id: 9919c2236cca4c01d93f01b28fa78cb7
    domain: device_tracker
    entity_id: 64b11da079bc57c7d388df8f2bed23e9
    type: enters
    trigger: device
    zone: zone.home
  - device_id: a0601c8b162f6ad31228b216d5f181a2
    domain: device_tracker
    entity_id: 5073c9668173ce0ca95606b5b5e0f453
    type: enters
    trigger: device
    zone: zone.home
conditions: []
actions:
  - action: cover.open_cover
    target:
      entity_id:
        - cover.niceit4wifi4a81da_garage_door
    data: {}
mode: single

And a screenshot in which you can see my device entering “home” is there multiple times… why ? is this the issue ?

Not a direct solution to your issue, but did you already check the “TRACES” option with the automation?
This can be reached like this: Settings → Automations & scenes → <your_automation> → TRACES in the top right corner.
In this screen you can browse for the latest few of automation runs, and see what exactly did happen in those runs.
You can also click on each step in the graphic to see more info about that step.
Just check-out all the available tabs. It might give a better insight of why it isn’t working as expected.

Would this mean your automation will trigger multiple times? I note you use cover.open as your action to open the gate. How is the gate setup in Home Assistant? Does a second trigger stop the opening?

I checked the traces and it did fire, however gate was only opening after long delay. @dcapslock , a second trigger does not stop the opening (but it should nit trigger twice as the automation is set to not run if another instance was already running…

However, looking at my phone “entering” the house zone multiple times (which I think is strange anyway) I suspected that might be the issue…

So, now I switched the automation to open the gate if an “entity” , like below and that seems to work way, way better… (also person detected in the zone is only once in the log)

description: ""
triggers:
  - trigger: state
    entity_id:
      - person.name1
      - person.name2
      - person.name3
      - person.name4
    to: home
conditions: []
actions:
  - action: cover.open_cover
    target:
      entity_id:
        - cover.niceit4wifi4a81da_garage_door
    data: {}
mode: single

type or paste code here