Skip to content

Conversation

@helmo
Copy link

@helmo helmo commented May 4, 2025

Thanks for the great card!

I was triggert by a monetary value being rounded to a single decimal while I configured 2.
image

I'm not a TypeScript expert, nor did I test this in all possible variations, so handle with care 😉
But this patch seems to do the trick.

image

@flixlix
Copy link
Owner

flixlix commented Dec 1, 2025

hey @helmo, to me this seems like expected behaviour, no?
I think it's more readable to only show meaningful decimals, which a 0 at the end is not...
I do understand the frustration in the case of currency, since you are expecting the number of cents. maybe we can implement some logic only for currency entities...?

@rhaschke
Copy link

rhaschke commented Dec 1, 2025

You can use a custom template to format as you like, e.g.:

    secondary_info:
      template: {{ states('sensor.tibber_pulse_strompreis') | float(0) * 100 | round(1) }} ct

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants