DBuit / Homekit-panel-card

Homekit panel card for home assistant
MIT License
304 stars 54 forks source link

Number Format - number.toLocaleString ? #67

Open zibous opened 4 years ago

zibous commented 4 years ago

Is there any way to format the representation of the number for a card ?

Bildschirmfoto 2020-07-20 um 15 07 34

entities:
  - title: "Wasserverbrauch"
    entities:
      - entity: sensor.wasser_liter_jahr
        name: Jahr
        localestring: 'de-AT'                     ##  this way ??
        tap_action:
          action: more-info
          entity: sensor.wasser_liter_jahr

Result for number.toLocaleString(localestring):

Number(54123.990).toLocaleString("de-DE")
"54.123,99"