hello.
i want to use my phone for presence detection (set a flag when the phone is connected to my wifi, reset it otherwise) but how do i do that? i have some unifi network equipment. should i install the unifi integration?
Easiest way is go here and install and set up the android app.
If you only want to know whether your phone is on WiFi or not then yea I think the unifi integration can do that. Android app does a lot more though.
Or you can set up the phone to have a static IP in the router and then use a ping binary sensor in HA to keep track of the connection status.
That way you don’t get inundated with all of the stuff that the Unifi integration adds to HA. Unless of course you want all of that stuff.
I use the mobile_app sensor for GPS for when I’m at work (e.g. calculating hours at work). But for when home I prefer nmap
(in combination with static IPs for the phones and nmap only searching for those IPs specifically) since that updates much faster than the gps sensor updates most times.
And then under my person entity I have both the nmap and the mobile_app device trackers.