dolezsa / thermal_comfort

Thermal Comfort sensor for HA (absolute humidity, heat index, dew point, thermal perception)
Other
541 stars 105 forks source link

To many decimals precision #290

Closed james-1987 closed 10 months ago

james-1987 commented 1 year ago

When i use the values from Thermal Comfort to display in minimalistic-area-card or mushroom-template-card from a states() output, it default to 13-14 decimals. I only use absolute humidity g/m³, not tested other values. I have changed from 0 decimals to other values in new function in HA display precision setting but it do not help. Other values in HA works fine.

I have tried: Redownload Thermal Comfort in 2023.05

Version this have been like this: ~2023.3 to 2023.05

Installed version: 2023.05

dogmatic69 commented 1 year ago

Same issue. image

roooodcastro commented 10 months ago

Having the same issue. Is this still maintained? Looks like there hasn't been any activity here for a while.

rautesamtr commented 10 months ago

Still maintained just not a lot of time and energy the last few months. Also this is an issue with lovelace plugins not supporting display precision so better to open tickets there. e.g. https://github.com/junalmeida/homeassistant-minimalistic-area-card/issues/59

dogmatic69 commented 10 months ago

I don't fully agree it is lovelace, as the only numbers I have issues with are from this integration.

rautesamtr commented 10 months ago

Do any of your other entities offer more precision in the base cards and are capped by the display precision? Thermal comfort follows home assistant guideline to not round values and use the display precision option in lovelace instead. https://developers.home-assistant.io/blog/2023/02/08/sensor_presentation_rounding/ The reason you have an issue with this integration is that we offer the unrounded results of calculation.

We had a similar issue when core changed the way states are translated and lovelace plugins haven't updated yet.

james-1987 commented 10 months ago

All the other updated plugins value i tested is correct (Nordpool, Daikin Residential Controller, SmartThinQ LGE Sensors etc.). So it need to be Thermal programing who doesn't follow new standards.

rautesamtr commented 10 months ago

What do you mean by is correct? What is the raw state of those sensors? Check in developers tools -> state. If it hasn't more precision then they aren't using the 'display precision' feature to begin with.

So it need to be Thermal programing who doesn't follow new standards.

See in the linked post:

Integrations are encouraged to remove rounding for display and instead set property suggested_display_precision.

That's what we are doing and you are saying this is wrong? Can you show me where this is implemented in the wrong way? To move rounding to the frondend is a decision from home assistant core. They had it in the integration side and decided against it. See this blog post for the old approach that has been reverted in favor of the new one.

Can you tell me where it misbehaves in custom cards that implement display precision? That would confirm this implementation of it is wrong or bugged.

Edit: Also see:

james-1987 commented 10 months ago

If i use value from other updated HACS plugin in Mushroom or minimalistic. It shows the new "user defined" decimal precision in HA. But not Thermal values. Thats od.