Measure a decrease distance


This is a different one. I have looked in all the threads I can and can not find this.

Here is what I want to do and then what I have.
What I what to do is compare my my previous distance to my house from here I am. or me moving compared to the duration to my house. I want to make an automate trigger that detects when the number to the house gets less. Turn on the automation.
I want to do this to keep me from having to keep turning on Maps to see if there is an issue on my way home. While this is triggered it is going to see if the time between duration and duration in traffic is less that or greater than 5 minutes. If I is greater. I am going to have it auto trigger an announcement with the delay time so I can self reroute. I can not find anything that will give me a route layout except for the Best: road. That doesn’t really help. Then if it decreases below 5 minutes. It will tell me what ever I want it to say. This automation will play till I get home and them turn off.

But I am not really understanding how to make this detect when the mileage to the house decreases. The sensor that is in the phone to detect if I am in the vehicle is not reliable. It can take up to 10 minutes before it detects. Some times I could almost be home before it would trigger. So I want to make a second trigger.



If you already have a method to get the current distance between you and home into Home Assistant, you can use the Trend integration or a combination of Derivative and Threshold integrations to track a decreasing distance.

If you don’t already have a distance sensor, but have a device tracker that reports GPS coordinates, you can use the Proximity integration.

Thanks to it the response. I didn’t know about proximity. Or even think of it this.