frontend icon indicating copy to clipboard operation
frontend copied to clipboard

History chart rounds values ​​in Y-axis labels

Open maksym-ivchenko opened this issue 4 months ago • 2 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.
  • [ ] I have tried reproducing the issue in safe mode to rule out problems with unsupported custom resources.

Describe the issue you are experiencing

Before the last update, the history graph labels on the Y axis displayed as many decimal places as the sensor provided. After the last update, the values ​​started rounding. One of my sensors has values ​​in the range of 3.278 - 3.281. Previously, the Y axis labels had the corresponding values ​​(3.278, 3.279, 3.280, 3.281). Now the values ​​are displayed as 3.28. Accordingly, I have now lost the ability to visually assess the changes in the sensor values ​​over time

Image

Describe the behavior you expected

The accuracy of the values ​​in the Y-axis labels should be calculated based on the spread of the values. If the spread of the values ​​is large, the number of decimal places may be smaller. If the spread of the values ​​is small, the number of decimal places should correspond to the sensor.

Steps to reproduce the issue

  1. Have a sensor that provides >=3 decimal places accuracy and a small spread of values.
  2. View it in a History Graph or the History viewer.

What version of Home Assistant Core has the issue?

2025.6.1

What was the last working version of Home Assistant Core?

2025.4.4

In which browser are you experiencing the issue?

Google Chrome 137.0.7151.104 / Home Assistant mobile app

Which operating system are you using to run this browser?

Windows 10 / Android 14

State of relevant entities

unit_of_measurement: V
device_class: voltage

Problem-relevant frontend configuration

type: history-graph
entities:
  - entity: sensor.cell_volt_average

JavaScript errors shown in your browser console/inspector


Additional information

No response

maksym-ivchenko avatar Jun 19 '25 17:06 maksym-ivchenko