MQTT sending excessive decimal points
Hi I have started to integrate Repetier Sever into my Home Assistant and I have noticed that sometimes the temperatures are reporting with 14 decimal points (currently I have it showing: 38.40000000000001). Is there anyway to reduce the DP to just 1 or 2?
Comments
But have a look on examples and threads like this on home assistants side: https://community.home-assistant.io/t/howdoi-convert-mqtt-received-value-to-a-2-decimal-place-float/239368/5
Out of interest why could Repetier Server send so many decimal points but only for a few numbers?
float point errors are machine dependent miscalculations by the computer itself like the famous: 1+2 = 3.0000000000000004
I will discuss with the team if we want to implement a correction method for those miscalculations for mqtt