I want my Home Assistant to know when I leave home by using my phones location sensors so that my heating turns off. I have the sensors turned on but my automation isn’t triggering.
Yes, this was something I had to find out as well. The app needs to send location updates and when it cannot because your instance is only available through the local network, the location stays where it was, so you are always at home according to HA. For me, setting up a ping device tracker worked as a decent home/not home binary sensor.
I assume you’re using the Companion App - therefore you probably do/will want to use it outside the house. The easiest way to do this is to pay for Nabu Casa, but a close second easiest (IMO) is Cloudflared. Then no need for a different sensor.
It’s fairly simple. See here for the documentation of the ping integration. Ping (ICMP) - Home Assistant
There are two more steps. One is that your router needs to assign the same ip address to your phone every time. That usually works better if your phone doesn’t use random Mac address for your home network, so those may need to be set up correctly.
The last thing, which is optional, is that you can link the device tracker to the person (yourself) that you want to track. This is done inthe ‘people’ section of the settings. Detecting you at home is done as a combination of different sensors, and you can use the person presence in automation. Alternatively, you can use the device tracker entity directly in your automation.
All this is worth while if you do not want to have your Ha instance reachable over the internet. If you do want that anyway, get a NC Cloud subscription, or set up cloudflared or other method as described in various how to articles.
Couldn’t he also set the companion app to broadcast a virtual beacon uuid, then have the iBeacon Tracker integration watch for this uuid constantly via an automation? When the iBeacon Tracker integration based automation does NOT see the virtual beacon, then the home/away state could be switched to away, right?
(I’m not sure if an iBeacon Tracker integration automation can be set to do something when a beacon is missing in action though).
I don’t know. I do know that there are a couple of ways to track a phone or other device, tried a few Iand for me ping was the easiest one to set up that worked reliably (except for the short period when the integration was moved to the ui and the consider_home was not available but that is in the past.)