core icon indicating copy to clipboard operation
core copied to clipboard

No decimal point in the values

Open Devil-67 opened this issue 6 months ago • 3 comments

The problem

I have just updated to 2025.6.1. Since then, some numerical values no longer have a

and are only displayed in single digits. Here is a screenshot of it. Image

But in the developer tools the values are ok. another screenshot

Image

What version of Home Assistant Core has the issue?

2025.6.1

What was the last working version of Home Assistant Core?

2025.5.1

What type of installation are you running?

Home Assistant OS

Integration causing the issue

No response

Link to integration documentation on our website

No response

Diagnostics information

No response

Example YAML snippet


Anything in the logs that might be useful for us?


Additional information

No response

Devil-67 avatar Jun 15 '25 08:06 Devil-67

This is what it looked like before with 2025.5.1

Image

Devil-67 avatar Jun 15 '25 09:06 Devil-67

I think there have been some changes recently to default display precision.

What do these entities have set for display precision?

karwosts avatar Jun 15 '25 14:06 karwosts

I have not set anything, the values come from Solar Assistant and also the decimal places. I also don't know how to set the display accuracy, I haven't found any options. But in the developer tools the values are ok.

Devil-67 avatar Jun 15 '25 14:06 Devil-67

Same problem for me.

Sleeper85 avatar Jun 16 '25 06:06 Sleeper85

https://developers.home-assistant.io/blog/2025/05/26/sensor-default-display-precision/

HA PR

HA commit

Sleeper85 avatar Jun 16 '25 06:06 Sleeper85

Image

esphome 2025.5.2 YAML code :

I don't see what more I can do in the YAML code, I think it's just a display problem on the HA side because in the history the sensor value is always 55.2V...

  - platform: template
    name: ${name} ${yambms_name} Requested Charge Voltage
    id: ${yambms_id}_requested_charge_voltage
    unit_of_measurement: V
    device_class: voltage
    update_interval: ${yambms_update_interval}
    accuracy_decimals: 1

Sleeper85 avatar Jun 16 '25 06:06 Sleeper85

The default display precision is not respected.

Image

Image

Sleeper85 avatar Jun 16 '25 17:06 Sleeper85

~Can you share the yaml for this frontend card, or wherever you are seeing this?~

The default display precision is not respected.

Image

Err sorry nevermind. I realize that the display_precision there is set to whole values (I was thinking 3 meant 3 decimals but it's saying 3V).

karwosts avatar Jun 16 '25 17:06 karwosts

The default display precision is not respected.

@Sleeper85 - can you elaborate what is not being respected?

The default display precision for Voltage device class was set to be 0 decimals.

SensorDeviceClass.VOLTAGE: (UnitOfElectricPotential.VOLT, 0),

Your entity display precision is currently set to 0 decimals. If you want it to be something else, change the display precision in the dropdown.

karwosts avatar Jun 16 '25 17:06 karwosts

Err sorry nevermind. I realize that the display_precision there is set to whole values (I was thinking 3 meant 3 decimals but it's saying 3V).

Yes, I was wrong too, it's not 3 decimal places, but the value of the 3V sensor.

Indeed, the default precision value for device_class: voltage is now 0 decimal places.

I don't understand why the developers decided to do this ?

Sleeper85 avatar Jun 16 '25 18:06 Sleeper85

I've the same problem, now dozens of sensor values are not displaying the value precisely enough. Before they were displayed with two or three decimal places as advertised by the ESPHome sensor.

I can change the precision back again, but for 60 sensors+ this is really no fun via the UI...

GHswitt avatar Jun 16 '25 19:06 GHswitt

I'm back to 2025.5.1 for now I don't think that was the plan and I'm sure it will be fixed.

Devil-67 avatar Jun 16 '25 19:06 Devil-67

I'm back to 2025.5.1 for now I don't think that was the plan and I'm sure it will be fixed.

I don't think this will be fixed because it's a choice made by the HA developers.

The developers of the various integrations will have to adapt their code to provide suggested_display_precision to HA.

I've personally opened an issue for esphome.

Sleeper85 avatar Jun 16 '25 23:06 Sleeper85

First it was entity names now this.

I had already set a custom precision for most of my voltage sensors. This update has overwritten that with zero decimal places for all of them. Now I have to do it all again.

Please stop altering my configuration like this. It is incredibly annoying.

tomlut avatar Jun 17 '25 00:06 tomlut

First it was entity names now this.

I had already set a custom precision for most of my voltage sensors. This update has overwritten that with zero decimal places for all of them. Now I have to do it all again.

Please stop altering my configuration like this. It is incredibly annoying.

That's true... HA 2025.5.0 is a mess in the names, 2025.6.0 a mess in the values... 2025.7.0 everything explodes ??? 🤣🤣🤣

Sleeper85 avatar Jun 17 '25 01:06 Sleeper85

Same problems here. Installation method Home Assistant OS Core 2025.6.1 Supervisor 2025.05.5 Operating System 15.2, Frontend 20250531.3

All cell Voltage display 3V,not dispaly decimal number...but from EspHome builder Log can see the value correctly: [D][sensor:093]: 'jk-bms cell voltage 1': Sending state 3.26700 V with 3 decimals of accuracy !!!! From log have also many of this massages,that before not have: [D][esp32_ble_client:191]: [0] [MAC ADDRESS] ESP_GATTC_NOTIFY_EVT

And if i try to reistall from Backup version 2025.5.3 i have error message: 'BackupManager.do_restore_partial' blocked from execution, no supervisor internet connection. Ps:I clean already browser cache.

Please fix issue.

Running Ha on Homeassistand Blue.

ans-gw avatar Jun 17 '25 13:06 ans-gw

Do I have this correct? A setting of "accuracy_decimals: 1" used to set the item precision prior to 2025.6.1 but is now disregarded over the system default of 0 decimals? And now, if you use "suggested_display_precision: 1" it will adjust the display precision?

dlarue avatar Jun 17 '25 14:06 dlarue

Do I have this correct? A setting of "accuracy_decimals: 1" used to set the item precision prior to 2025.6.1 but is now disregarded over the system default of 0 decimals?

Not quite correct.

accuracy_decimals set the number of decimals in the entity state. That hasn't changed and is still the case.

Prior to this blog post, entities with no suggested_display_precision set just displayed their raw state.

After that change, all sensor entities now default to the global default display precision for their device class. For e.g. device_class: voltage, that default was chosen to be zero decimals.

Integration developer may override this default for an entity to a display_precision of their choosing, via suggested_display_precision. If you want to discuss how esphome should set this, follow the linked issue

Users may override the suggested display precision per-entity by setting the display precision setting in the entity registry.

And now, if you use "suggested_display_precision: 1" it will adjust the display precision?

suggested_display_precision is not something set by the user, it is not a yaml option.

karwosts avatar Jun 17 '25 16:06 karwosts

If it's too many to click and you know a little javascript, I think you can batch program it in the browser console, e.g.

['sensor.carbon_dioxide', 'sensor.carbon_monoxide']
  .forEach((id) => 
    document.getElementsByTagName("home-assistant")[0].hass.callWS(
      {
        type: 'config/entity_registry/update',
        entity_id: id, 
        options: {display_precision: 3},
        options_domain: "sensor"
      }
    )
  )

Maybe that will be helpful for someone.

karwosts avatar Jun 17 '25 17:06 karwosts

suggested_display_precision is not something set by the user, it is not a yaml option.

But these are some things that should be used by HA component developers to specify the number of decimal places to display by default.

It's just a shame to have sudden changes like this without giving other developers time to adapt their code.

This is what I asked the esphome devs.

Sleeper85 avatar Jun 18 '25 06:06 Sleeper85

Incidentally, it has nothing to do with ESP home, which I don't use. My values come from the Solar Assistant, for example. It seems to be a general problem with the voltage values

Devil-67 avatar Jun 18 '25 15:06 Devil-67

Incidentally, it has nothing to do with ESP home, which I don't use. My values come from the Solar Assistant, for example. It seems to be a general problem with the voltage values

Yes, it is HA that changes the rules and providers like esphome or other integrations have to adapt.

Sleeper85 avatar Jun 18 '25 16:06 Sleeper85

But then I'm surprised that more users don't report the problem

Devil-67 avatar Jun 18 '25 16:06 Devil-67

Are there any public statistics showing the updates to 2025.6.x from 2025.5.x? Could be slow HA update rate.

dlarue avatar Jun 18 '25 16:06 dlarue

Are there any public statistics showing the updates to 2025.6.x from 2025.5.x? Could be slow HA update rate.

https://analytics.home-assistant.io/

karwosts avatar Jun 18 '25 16:06 karwosts

Awesome but holy cow there's a good size chunk using 2025.6 so I'm guessing the vast majority are using HA to turn lights on/off instead of monitoring solar systems, batteries, toaster heating element temperature, the fun stuff, etc.

I think I need to look into why there are so few, of the ~500,000 HA active users, aren't throwing together esp32 D1 WeMos nodes all over the place.

dlarue avatar Jun 18 '25 18:06 dlarue

WARNIING...................WARNING...................WARNING.....................WARNING....................WARNING. With this Ha update all values not have decimals.In my case from Inverter and from Bms. let's stop and think for a moment....how many users use for example Mppsolar and Jk Bms ,or other to monitor and control the battery charge?...especially the lithium ones that burn easilyThis is very dangerous, and can lead to battery damage, or the battery can catch fire, because it is overcharged!!! It could even burn down the house.... Who will be liable for these damages? This problem need to be fixed quickly. Thank you.

Running Ha on Homeassistand Blue.

P.S.: before to push update that modify something so important and dangerous ,should think twice before !

ans-gw avatar Jun 21 '25 05:06 ans-gw

Thankfully it is only the display which has dropped resolution and the data still retains accuracy. Still not very good for anyone with weak hearts to see values on the display rounded down or up to nearest whole number.

dlarue avatar Jun 21 '25 13:06 dlarue

I am fine with a system wide default for precision, but there should be at least a possibility to either disable that behavior and show the raw value again, or be able to set the system default to a different value.

in my case, i would have to update all my MQTT sensors because they dont have an own default.

my dashboard for the BMS are useless now with this.

would be nice if a future update introduces one of these options:

  • set a custom global default
  • disable default to show raw, if no accuracy is give by the entity.

Snooz82 avatar Jun 22 '25 20:06 Snooz82

What is the worst is I will periodically have a network issue so my dashboard will lose connection and when it comes back the display precision settings I manually set reverted to no precision! THAT sucks!

dlarue avatar Jun 22 '25 23:06 dlarue