-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sensor precision not respected #286
Comments
@Wesley-Vos : Trying to understand your Edit.... (since I dont have a clue how these js-plugins are coded) have you got a workaround for the issue? |
@TheQue42 You have to add it to your card configuration in HA, not in the plug-in itself luckily. For example, check out this card configuration: type: entities
entities:
- entity: sensor.util_energy_daily
name: Usage today
secondary_info: last-updated
show_state: false
type: custom:multiple-entity-row
entities:
- entity: sensor.util_energy_daily_low
name: Low
format: precision2
- entity: sensor.util_energy_daily_high
name: High
format: precision2
- entity: sensor.util_energy_daily
name: Total
format: precision2 The |
I do not think that the card should use recently added precisions. |
Perhaps in absence of any "format" option it should honor the new defined precision for the entity. We get best of both worlds: support for consistency with the new HA feature while still having the option to go with any custom format/precision. |
Yeah I agree! That is the best of both worlds, and is in line with the other built-in HA cards as well. |
Well, it probably will be a perfect variant. |
Thanks, adding Seems to work. However the docs also say we should be able to use format: number X but that does not work. |
Type of what? Consider explaining yourself, otherwise you are saying riddles. |
I meant the type column in the docs. I misread it as the actual syntax. |
No no, It is just an additional explanation: some formatters may be used for numbers, some for datetime. |
Progress? Or is everyone happy with the applied |
Just noticed that the latest HA release has added new methods to allow entity state formatting for custom cards. |
Almost all of my sensors use a non-default precision, so this issue requires a lot of extra YAML, just to make the multiple entity row behave like the rest of the entity card. |
The new sensor precision introduced in 2023.3.0 is not respected. The full sensor value is shown instead of the rounded value.
You can reproduce it by adding a multiple-entity-row with a numeric sensor entity. In the more-info dialog of the sensor, change the precision to something non-default and observe that the full state is still shown in the multiple-entity-row.
For more information, see https://developers.home-assistant.io/blog/2023/02/08/sensor_presentation_rounding/
Edit: in the meantime, it can be fixed by adding
format:precision<0-9>
but in my opinion, the default precision should be used, just as it was before < 2023.3.0.The text was updated successfully, but these errors were encountered: