Round shown values in Lovelace

How do I round the shown numbers from my Utility_Meters, while keeping the actual numbers correct.

I just want the numbers to be shown rounded in the UI - Home Assistant should keep the actual numbers to do all further calculations

2 Likes

There is no facility in Lovelace to do this. You would have to create a template sensor.

It would be great if this could be added as a function in Lovelace in the raw code editor. I have about 50 sensors for which I would like to use this function. Where can I provide this as a suggested addition?

1 Like

Someone already has. Vote here:

You can use the “multiple-entity-row” custom Lovelace card. While it is designed to present multiple entities on one Lovelace row, it is also extremely flexible in rounding numbers by using the “format: precision1” function.

3 Likes

Presentation of rounded values is clearly matter of user interface => lovelace. I am surprised that there is a year-long discussion about it at github, yet the modification of lovelace should not be that complex.

4 Likes

Any update on this?

bumb also very interested in this. Now that we have a new way of combining sensors (with helper groups) it’s even more important to be able to round / dictate the precision of sensor values…

For instance the temperature of my freezer is now: -22,745 °C (I think -23 °C would be good enough).