The drops are normal, expected behavior for this integration. History Stats is based on the values stored in the Recorder which by default stores 10 days worth of data. As the data is purged, the value of your time type History stats will drop by however many hours were from the purged time period.
The jump is a bit unusual. I would only expect to see something like that if you altered the sensor configuration.
Many thanks for the quick response.
Now I understand correctly, “platform: history_stats” is not suitable for my purpose “operating hours counter over longer periods of time (months, years)”
How can you implement something like this in HA?
If you create a sensor for hours today then you could use a utility meter to sum it all up for an all time total. Make sure to set Periodically resetting to true. you can also use it to create year/month,… totals.
I think you could use utility meter for that too, assuming it accepts the source entity type. It was designed for energy, gas, water, etc. but the principle is the same.