This is likely for Matt and or Jay..
Updating states with
dev.updateStateOnServer(stateName,round(value,1))
where value is a float
And sometimes get instead of 9.2
I know that float to string sometimes is not exact(*), but how can I avoid getting 10 digits. This is just the opposite of what should happen
Karl
(*) from docs.pytho.org
Note The behavior of round() for floats can be surprising: for example, round(2.675, 2) gives 2.67 instead of the expected 2.68. This is not a bug: it’s a result of the fact that most decimal fractions can’t be represented exactly as a float. See Floating Point Arithmetic: Issues and Limitations for more information.