Sensor with time since last battery charge

Hi,

I have an ESP32 device that runs on batteries and I have a sensor that monitor the battery voltage, usually from 3,3v when it is fully charged to 2,9v when it is discharge.

I want to see in my dashboard when was the last time I charged the battery, and for that I would like to create a template sensor that compares the last 2 values of the voltage and if the volgate went up more than 0,3v then it means the battery was charged, I could find anything about checking last value and also previous value to do a diff between them.

Any recomendation for that?

You might want to take a look at Battery Notes.

I don’t fully understand it, and my device don’t appear. But I would like to try something without having to add an integration