So I’ll share everything you need here but at the very base of these is essentially this package. Granted I adjusted that authors tasks a little bit as you can see further down in that thread here but that’s the base package used for communicating with HA. I’m going to share my versions of those tasks but you should also be fine just using the originals if you prefer or already have them.
For basic HA communication you’ll need these 4 tasks:
To make these work you just need to fill in the two global variables referenced in them. Put your Home Assistant URL in %HA_ADDR
and a long-lived access token in %HA_TOKEN
.
Then for car tracking you’ll need these two tasks and the profile that triggers them:
Once you import these you’ll see two new referenced global variables to fill in. Put your car’s bluetooth name in %CAR_BT_NAME
and its mac address in %CAR_BT_MAC
. Then whenever your phone goes from being near the car’s bluetooth to not near it will stash its location in HA. It does this using device_tracker.see
so its a custom device tracker. The Bluetooth name will be used as the tracker name.
Then finally the last 3 tasks are shortcuts you can put in your home screen or quick tiles menu to immediately launch into navigation mode and navigate to your car:
- Walk to Car task
- Transit to Car task
- Navigate to Location task (note this one isn’t intended to be run directly, it’s a dependency of the other two)
And that’s it, should be good to go. If you take a look you’ll see that all the real logic here is in Track Device Location
and Navigate to Location
which both take the device ID as a parameter. This way if you want to track other bluetooth devices (like I did with my headset) its very simple. You can clone the other tasks and just replace CAR_BT_NAME and CAR_BT_MAC with the name and mac of some other device.
One FYI though - I do depend on the Tasker add-on AutoTools. I basically just use it for JSON processing so you can get by without it but. you’ll need to change some things. Tasker’s OOTB JSON handling options are a lot more difficult to use unfortunately.