frontend icon indicating copy to clipboard operation
frontend copied to clipboard

Small graphic ugliness in Gauge card (format `0.0` as `0`)

Open WRoss7 opened this issue 1 year ago • 7 comments

Checklist

  • [X] I have updated to the latest available Home Assistant version.
  • [X] I have cleared the cache of my browser.
  • [X] I have tried a different browser to see if it is related to my browser.
  • [X] I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

When the value is zero and the variable is float "0.0" is displayed

Gauge

Describe the behavior you expected

The value to be displayed should be "0"

Steps to reproduce the issue

..

What version of Home Assistant Core has the issue?

2024.1.3

What was the last working version of Home Assistant Core?

No response

In which browser are you experiencing the issue with?

120.0.6099.217

Which operating system are you using to run this browser?

Windows 10

State of relevant entities

No response

Problem-relevant frontend configuration

No response

Javascript errors shown in your browser console/inspector

No response

Additional information

No response

WRoss7 avatar Jan 13 '24 17:01 WRoss7

Don't think there's anything unique to gauge card in this logic, it uses the same rules as all our other number formatting.

If my sensor is "0" it displays "0". If my sensor is "0.0" it displays "0.0".

If you set the display_precision for the sensor to whole numbers, than that should be honored as well.

What is the exact state of your sensor from devtools, is it 0.0?

karwosts avatar Jan 14 '24 15:01 karwosts

My input.number:

InputNumber2

In devtools:

InputNumber

Imo 0,0 (or 0.0 depends on the country set) is not very user frendly. Wouldn't it suffice to display "0" when the value is "0.0"?

WRoss7 avatar Jan 14 '24 15:01 WRoss7

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Apr 13 '24 18:04 github-actions[bot]

As above

WRoss7 avatar Apr 16 '24 19:04 WRoss7

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] avatar Jul 15 '24 21:07 github-actions[bot]

No stale

WRoss7 avatar Jul 22 '24 20:07 WRoss7