Today's distance

My Owntracks continuously sends my location to Home Assistant. Except that I enter a known zone, the exact location is not used.
I would like, whenever I got home, I could see the distance in KM traveled since I left home, using the positions sent during the journey.

It’s useful to those who practice sports, and also to calculate transportation and travel costs.

I think it’s necessary to use Google Maps to calculate the distance from the last point to the current point, and then accumulate with the next ones until the device arrives at home. Then trigger the notifications.