Open CommanderKSK opened 1 year ago
@CommanderKSK Thank you for using the card, please read issue #13
@t1gr0u I have read the issue and did some digging. According to the docs the formatting is controlled with rounded=True
. https://www.home-assistant.io/docs/configuration/templating/#states
I have the rounded value in the developer tools with this {{ states('sensor.current_uv_index', rounded=True) }}
Hopefully this helps solving this issue.
@bluediamond1984 oohhh, interesting, thank you, this may help :)
I have the rounded value in the developer tools with this
{{ states('sensor.current_uv_index', rounded=True) }}
Hopefully this helps solving this issue.
@bluediamond1984: Hhm, I would need more help. Have you created a new template sensor with the rounded value or is there a way to modify the value of the original sensor?
@t1gr0u : Maybe you could add a round parameter? to your card?
A template sensor is not needed. sensor.current_uv_index
was created by the integration OpenWeatherMap. I have recently changed to OpenUV, and it works the same.
In the GUI go to the entity settings and change the display precision to desire.
In the GUI go to the entity settings and change the display precision to desire.
Did so an it reflects i.e. in the integrations site, but not on the card.
I misunderstood it. I used the developer tools to see the difference in the first place.
I have tested it with a template sensor and it's working with a rounded number.
I was trying to figure out what has to be added. I think something has to be added with this line in the code const entityState = entityId ? this.hass.states[entityId] : undefined;
. But I don't understand the language.
Checklist:
Release with the issue:
Last working release (if known):-
Browser and Operating System:-
Description of problem:The card displays all 4 decimals like (7,2669) even if you set the accuracy in Home Assistant to a full number (7 in this case) it ignores this and still displays all 4 decimals.
Javascript errors shown in the web inspector (if applicable):-
Additional information: