@raducanu said in VariablesDevice automatic round?:
Why is the VariableDevice Rounding and cutting off values?
Actually it is not the implementation of the VariablesDevice cutting off values, but it is the pimatic-mobile-frontend doing this. It has been a general design decision by @sweetpi to format number values into a more readable value.
The package used is “human-format”. Unfortunately, the frontend uses a pretty much outdated version of this and aligning this to the current version will require some refactoring of the front source code. Thus, quite a bit of code for handling “special cases” have been added in the past and so did I. On master there is a tentative fix which formats Euros with 2 fixed decimal places if the amout is less than 1000 Euros. Otherwise, the amount is given in k€ (“kiloeuros”) without decimal places.
This is probably still not what you would like to see it fuel prices where it makes sense to have three decimal places. I’ll will think about this and may come up with a more elaborated solution soon. Generally, I think users need a better way of controlling the rendition of number values in the frontend.
"It always takes longer than you expect, even when you take into account Hofstadter's Law.", Hofstadter's Law