There are always EspHome and HA updates and every time it literally takes over an hour going through all my dashboard displays to reset the decimal places and some no longer have that option and it has to be done in YAML code using round(). But with round(3) the displayed data will shift around from 3 decimal places to 2 decimal places moving elements as the position affects other elements. Is there a way to force round(3) to constantly show to 3 decimal places even when a number, for example, goes from 3.222 to 3.220 ?
I ONLY have 3 battery packs with 16 battery cells each so ONLY 48 of these along with the many other data elements of my solar system:
I would like to do that but I have a few problems. First if i look at the code at the top of this thread I see that the dashboard used includes html tags. I have only a phone to use and I can only open HA remotly with the companion app. There I can only see the yaml of a dashboard page.
I can add this to developer tools - template page in the companion app and there i get the result that the thread ownersl describe but when changing it gives there it gives the desired output
I tried changing:
states(‘sensor.yambms_shunt_basen_bms_1_battery_power’)|round(2)
to
states(‘sensor.yambms_shunt_basen_bms_1_battery_power’)|round(2)| float + 0.01
but every now and then the display goes from 52.65 V to 52.640029751 V
so it’s even worst than switching between “52.69 V” to “52.7 V”
Man, this all worked fine when I started using HA and then one of the HA devs decided to change how things were displayed and broke all the display defaults.
In the OverView dashboard which shows all of my device entities I can find the individual entities which need display decimal adjusting and adjust them but when I have a card with a grid of entities I can’t set the individual entity display resolution.
It seems any of my entities in my dashboards which are individual elements will let me set the UI decimal place displayed but that option is not available when I pack/group things together and only YAML code manipulates the displayed parts of the grid card.
Ok, I’ll see about figuring out where to create the unique ID and see if it works.
And then the fun would begin figuring out how to generate unique IDs for a few dozen entities or getting the authors of my ESPHome devices to update their templates. This has been an ongoing problem since around the middle of the year so I’m guessing they’re not fond of the idea or else they would have done it long ago.
But the main grouping will be all the BMS battery cells and I plan on adding another display of battery cells since I’ve added a balancing module which also displays battery cell voltages and line resistance so 16 of each per battery. ugh.
So I don’t understand how changing the IDs would enable me to set a display resolution in a grid card showing a group of sensors which all have unique IDs already.
Here is one tab of my energy system display which somewhat shows all the grid card groups. It would be a shame to have to break everything into individual entities just to get the display precision stable and correct.
The unique_id is an attribute that is used by the UI to allow control of things. I’m not talking about the entity_id or the device_id. unique_id is it’s own thing.
See my original post.
Thanks for the inspiration! I will try to build a similar view for my card. Give me a few days. I think I can do it. Do you have a separate sensor for each cell to monitor cell balance? I think that will be my biggest problem.
As you can see, my battery cell voltage sensors do have Unique IDs because if they did not, according to the link you posted, there would not be the reset icon next to the entity ID field.
And I can set the display precision of individual bms battery cell voltage entities but when displayed in a grid card I can not and they all display with the full stored precision unless I add something to the YAML code for the grid card at each entity listing. Like that ‘round(3)’ mentioned in my first post. But rounding sucks because it does not fix the precision and the displays will shift all over the place as things like 3.399 become 3.4 instead of 3.400.
That will only set it for that display element AND it gets lost after a system update which drives me nuts because I’ve done this a half dozen times but the last update also changed what the battery cells are showing. And that UI 'settings" icon is not available for the entire grid card and it will not set it for everywhere else the entity is displayed like in the image where I showed all 3 battery packs each with a grid card display showing 16 battery cell voltages out to like 16 digits.
That precision is set and loaded from the config, you do not have to reset it dozens of times. You likely just need to refresh your page if you’re seeing different sig figs.