Help with special solution

Hello, I have ATV (polaris) and I build dashboard for the atv, I see there the engine hours and when I need to replace/to add oil and plugs and few more things, I made a button on dashboard to add 1 engine hour and then I see how many hours I need to do the things .
I want to make it automatically , now I need your ideas and help, I want some sensor that I can to connected to my atv battery or to switch and when the atv its on so the sensor start to count the time and when I will come back to my garage the sensor will pair auto to my wifi and send the value from the sensor…
there is something like that or I living in a dream?
thank you!

You will probably need to build something yourself.

I think a method would be to use an ESP that runs something custom that gives you a JSON output (a web API) thing.
This should mean that when this device connects to your home wifi HA could poll this IP and get a JSON response with say 5 hours.

To get the hours I think a way would be to measure the voltage of the battery, so anytime it’s above 13 volts then it’s running.

The issue is that you need to store this value in EPROM to make sure you don’t loose the data in case it has a short loss of power.

It’s perfectly possible, all parts by themselves are not hard to do but getting app parts to work together is a different animal.

I guess you could write to a SD card also.
Not sure if that is easier though.