Is the person home?

Having real issues with detecting iPhones being ‘at home’. Using Unifi and it is possibly the private mac address that is causing the issue, but the Unifi device tracker simply doesn’t work.

I’ve now created a user for one of them and got them logged into the app.

What is the best way to configure this so HA knows if the person is home?

I created a presence sensor (based on the app reporting SSID), but I cannot add that to the user - you can only add device_tracker sensors to a person and you cannot create a binary_sensor that is a device_tracker.

Going round in circles here for something that should be so easy!

The App creates a device tracker for the device logged into HA using the app.

device_tracker.“device_name”

For IOS the “device_name” = settings>>general>>about>>name

Not sure about android

You should be able to add the device tracker to a person.

1 Like

If you check the box on install to track the user, the device is automatically assigned to the user account and you should be all set.

1 Like

It is absolutely the private MAC causing the issue. Unifi sees each iteration of the ten or so macs as a different device. You can turn off the Private MAC address by SSID. That will stop that nonsense. (Totally awesome for public networks, not necessarily helpful in this use case on your home network.
Turn it off for your Home SSID in WiFi settings (sorry not an iOS user - dont have pictures)

Next: enable the Unifi created device tracker…

Once that tracker is linked to your ‘person’ - tracking should work.

1 Like

Those are enabled by default if using the Unifi Network integration…

Still playing with this.

I now have an MQTT Device Tracker defined, with an incoming string of off or on. I thought by defining the payload_home, it would convert this to home/away but it doesn’t (just returns on/off). I have tried True/False as well as the payload.

Am I missing something? Do I need to template it to return home and not_home?

from my mqtt.yaml file;

device_tracker:
  - name: "xxxx_home_ssid_mqtt"
    state_topic: "device_tracker/xxxx"
    payload_home: on
    payload_not_home: off