Long-term location tracking

Hi,

I’m looking for a way to getting long-term (year) location data for my wife and me from HA. We both travel for business and at the end of the year, we’d like get a list of trips we’ve made so that we can write off the mileage.

I’ve looked at dawarich, but found it to be unsuitable.

Is there another integration I could look at that might provide this service? Failing that, how hard would it be to query the HA database and get this data? I know Python, if that helps.

Any thoughts would be most welcome.

Mike

I can’t speak to an integration that will do what you’re asking, but…

Only numeric sensors can be stored in Long term statistic, so the location data you can query is going to be limited to what is in the Recorder, which defaults to a rolling 10-day purge cycle.

Some people use database integrations like InfluxDB to store specific entity data that they want to keep long-term. If you are a Google user, it is possible to push data to Google Sheets.

You may try setting “purge_interval” to “1 year” and then periodically purge everything except “person” or particular “device_tracker” entities.