nymea / nymea-app

A nymea frontend app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

the current power consumption is displayed with different decimals in different pages

Danfro opened this issue · comments

In two places (plugs page,meter overview, first two screenshots), the meter displays the current power consumption with one decimal. The plugs details page and the overview display two digits.

In all places the same number of digits should be displayed.

grafik

grafik

grafik

grafik

ok... I just checked the code... Now the reason why it's like that currently is that the details view as well as the main view tile don't really know what that number is. Those views will always truncate floating point numbers to 2 digits, be it Watt or °C...

The others instead, the views made explicitly for energy devices have some more logic:
they check if the value is < 1000, and if so, they will present it in Watt, rounded to 1 decimal points. If it's larger, they will show kW instead, rounded to 2. I think the reason was because many bigger devices (like high power solar inverters or wallboxes) often just give full W, and it looked crappy if it's always X,00, so having that X,0 would be the best compromise with lower power meters like smart plugs.

tbh I'm inclined to close this and leave it as it is...