Closed TTLucian closed 3 years ago
The card is only requesting to increase/decrease the step value in the original value. You may have to manually change the original value to a round number first to fix the issue.
I see the same, My temperature was 20.2 °C
, then I click two times on the "+" of numberbox-card , and the temp is now 20,400000000000002 °C
I think you can reopen this issue
It's a float issue from most of programming language, javascript have it too.
I think you need to add a fix here : https://github.com/htmltiger/numberbox-card/blob/main/numberbox-card.js#L80 (not sure, I don't know javascript well)
You know you have a 0.001 max step : https://www.home-assistant.io/integrations/input_number/#step
So you can add : variable_of_the_value=Math.round(variable_of_the_value*1000)/1000
I have updated as suggested. please check the updated version.
Thanks.
Looks good to me. Thank for the changes
Hello! First, thanks! This is a very useful card. I'm having some problems with the actual value of the input_number helper. I don't know from where this comes but, here it is: