custom-cards / flex-table-card

Highly Flexible Lovelace Card - arbitrary contents/columns/rows, regex matched, perfect to show appdaemon created content and anything breaking out of the entity_id + attributes concept
GNU General Public License v3.0
198 stars 23 forks source link

round decimal places #138

Closed nuki47 closed 1 month ago

nuki47 commented 1 month ago

How can I round or cut the decimal places of a sensor value?

image
EdLeckert commented 1 month ago

As explained in the docs, you can use:

modify: parseFloat(x).toFixed(0)

in a column definition.

Having said that, I'm working on a feature to allow you to use Home Assistant's standard formatting, which includes the ability to set display precision on entities.