If you give a history_stats entity a unique_id, then it will have full, unrounded precision (and you may change the display precision in the entity settings).
I guess this rounding is just to preserve backwards compatible output for entities which cannot set a display precision.
Which parameter in the entity settings is used to set the accuracy?
My task looks too simple: I need to calculate how many total seconds an entity worked in a specified period of time.
History_stats does exactly what I need in the code: it counts the sum of seconds, but at the end, before returning the value, it converts seconds to hours and rounds to hundredths, and returns the value 0.0, as if the entity was not turned on at all.
What parameter should I use to increase the precision for the value 0 ?