custom-cards / button-card

❇️ Lovelace button-card for home assistant
MIT License
1.93k stars 233 forks source link

How to remove the thousands separator in a numeric display? #750

Closed db-one closed 1 year ago

db-one commented 1 year ago

image

How to remove the thousands separator in a numeric display? Thank you so much

square: false columns: 3 type: grid cards:

RomRider commented 1 year ago

By default, it follows HA's configuration. If you don't want that, you can just display the raw state :

state_display: '[[[ return entity.state; ]]]'
db-one commented 1 year ago

ok. thanks, it solved my problem image

db-one commented 9 months ago

默认情况下,它遵循 HA 的配置。如果你不想这样,你可以只显示原始状态:

state_display: '[[[ return entity.state; ]]]'
state_display: '[[[ return entity.state; ]]]'
numeric_precision: 0

Sorry to bother you, these two parameters conflict with each other, Added state_display: '[[[ return entity.state; ]]]' Then numeric_precision: 0 , This parameter is invalid. How can I make them valid at the same time? Thank you very much. I hope you can help me.