That’s a botch, using the fact that the “standard” decimal point looks like the EU thousands separator, and doesn’t work over six digits.
Why do you want to do that? The standard dashboard will already render numbers like that — the state of the entity shown below is 296281, and I’m in the UK with comma separators:
If you force the separators into the state, HA will stop recognising it as a number via filters like float and int — you’ll lose the ability to see it in graphs, use it as a trigger etc.
If you really must do this, I’d recommend using a template sensor for when you need the separators, like this:
Yes, dividing is not a solution, doesnt work with 6 digits.
I’m not using standard dashboard elements. there are a few custom elements like charts, bars etc. I think the problem is custom elements. they are not render correctly.
Oops yes, I misread the OP’s question and assumed it needed to be divided once I saw the “.” and hadn’t noted he asked to update the thousands separator (as where I live that would be “,”).
I agree that you wouldn’t want to turn it into a string by putting a separator in there.
The value will be formatted when you look at it using any standard HA card. The value will not contain formatting within a template. You do not want it containing a format within a template so that you can use it to perform math. xxx.xxx.xxx is not a valid number in Jinja but xxxxxxxxx is. If you want to format it, you have to use jinja formatting when outputting it from a template.
However, I would like to display the value in a custom:config-template-card.
For this reason I was asking for help with jinja formatting.
With particular attention to the fact that, if the attribute does not have a value or not is available, do not generate an error