Unifi Direct device tracking stopped working

About a month ago, I posted this thread:

Thanks to your help, my home assistant was able to identify if any of 3 iPhones were connected to the home wifi, and if not, turn the lights off. Everything worked properly for several weeks. Yesterday, it stopped working.

I had been fiddling around in my network rack, turning off some of the equipment to cleanup the wiring and turning it back on. Everything is physically connected the same way it was before - just with less mess.

Home Assistant does not seem to know whether any of the 3 iPhones are connected to wifi.
Connecting or disconnecting the phones does not change their state within Home Assistant.

I realized that the access point did not have a static IP, so Home Assistant could be looking for an IP that didn’t exist. I fixed that by assigning the access point a static IP. Additionally, the 3 phones do not mask their MAC addresses.

This is using the Unifi Direct method of device tracking. My access point is a Unifi UAP-AC-Lite. And my Home Assistant is core version 2022.7.5 and operating system version 8.2, running on a Raspberry Pi 4.

Any ideas here?

The information below has the sensitive fields redacted :

Config.yaml:

device_tracker:
  - platform: unifi_direct
    host: IP_ADDRESSS_OF_ACCESS_POINT
    username: USER_NAME_OF_ACCESS_POINT
    password: PASSWORD_OF_ACCESS_POINT
    interval_seconds: 15
    consider_home: 180

Automation to turn off lights after 3 minutes if no one is home:

alias: Lights off when nobody home
description: ''
trigger:
  - platform: time_pattern
    minutes: /3
condition:
  - condition: state
    state: not_home
    entity_id: device_tracker.FIRST_IPHONE
  - condition: state
    entity_id: device_tracker.SECOND_IPHONE
    state: not_home
  - condition: state
    entity_id: device_tracker.THIRD_IPHONE
    state: not_home
action:
  - scene: scene.all_lights_off
mode: single

Well, I hate to admit this, but I fixed the problem and I have no idea how.

I updated the home assistant core and OS, rebooted, and rebooted the access point. Somewhere in the mix, the automation started working again.

I can confirm that a restart of all AP solved the issue for me. A controller restart, I’ve tried before didn’t help.