benct / lovelace-multiple-entity-row

Show multiple entity states and attributes on entity rows in Home Assistant's Lovelace UI
MIT License
797 stars 60 forks source link

The sensor is displayed with a decimal part that should not be there #333

Open man55 opened 7 months ago

man55 commented 7 months ago

I have sensors that are specified to display as an integer. In the standard HOME card they are displayed correctly as an integer. But when I use the lovelace-multiple-entity-row, these sensors are displayed with a decimal place, which is very annoying. I tried changing regional settings, but it has no effect.

type: entities
entities:
 .....
      - entity: sensor.xxxxxxxx_fanrpm_combine
        name: fanrpm
        styles:
          width: 74px
          text-align: center
Screenshot 2024-02-22 183250 Screenshot 2024-02-22 183224 Screenshot 2024-02-22 183217
ildar170975 commented 7 months ago

Why not using a documented native formatting option? https://github.com/benct/lovelace-multiple-entity-row?tab=readme-ov-file#formatting

man55 commented 7 months ago

Thanks, it worked.

Only now I need to add several dozen extra lines to the code :((. And so I don’t understand why by default the mod can’t use the format that is defined in the sensor, why add a decimal to it?

ildar170975 commented 7 months ago

And some other users do not understand why to reduce an initial accuracy of sensors in frontend globally. Like me: there is NONE of sensors in my setup with changed accuracy; if I do not need some extra digits in a particular card - I change this in this particular card.