WTH, why do I get absurd graphs with values of 3,9220000000000006

An image says more then 1000 words.

And before you ask, the precision of that sensor is set to 2 decimals.

There is an issue on GitHub.

Suggest you to post screenshots in English next time.

Thanks, although Iā€™m not sure itā€™s the same issue. I have this sensor for a long time already, and itā€™s not a statistics sensor, but a normal one from an ESPHome device. It just randomly goes to a weird rounding error from time to time.

If by ā€œstatistics sensorā€ you mean a sensor created by the Statistics integration - this issue is not about it.
The issue is about entities with LTS - which I guess could be your case (hard to say since you did not post screenshots in English).

I know thereā€™s a technical term for the phenomenon but I canā€™t remember it off the top of my head but if you plug this into your preferred search engine it will explain what is happening:

ā€˜numerical rounding error pythonā€™

In short, itā€™s not HA. Itā€™s Python.

No idea about python, with C from 96 (+ true rocket ā€œrocket scienceā€). So, the whole issue with rounding seems rather strange for me.

Itā€™s every language. All of them do this.

Itā€™s usually hidden from users (I.e. The UI should handle it properly).

1 Like

That is what I am talking about. Float epsilon can be handled.

Machine Epsilonā€¦thatā€™s what I couldnā€™t remember.