Car trip counter

I’m looking for help making a trip counter for my car. I have the vehicle mileage in HA, but I would like to have a separate sensor that I can reset any time that would increase at the same rate as the car. How do I get the counter to increase at the same rate as the mileage of the car?

Use an input helper. Set it to the odometer value when you want to reset (using s script or automation). Then create a template sensor that subtracts the input helper from the odometer.

If the odometer increases frequently enough during the trip you could even make the automation that resets it in such a way that it automatically resets when the odometer starts changing after it has been stable for a certain time.

1 Like

Could use something like this.