maxwroc / battery-state-card

Battery state card for Home Assistant
MIT License
848 stars 38 forks source link

Wrong display with space separated thousands #709

Open Gonioul opened 6 months ago

Gonioul commented 6 months ago

Describe the bug Display is wrong with space separated thousands, ex: "1 024 W" is trucated to "1 W"

YAML configuration

              - type: custom:battery-state-card
                title: Plugs
                unit: W
                icon: mdi:power-plug
                sort:
                  by: state
                  desc: true
                colors:
                  steps:
                    - value: 0
                      color: var(--label-badge-grey)
                    - value: 25
                      color: var(--label-badge-blue)
                    - value: 50
                      color: var(--label-badge-green)
                    - value: 75
                      color: var(--label-badge-yellow)
                    - value: 100
                      color: var(--label-badge-red)
                collapse: 10
                tap_action: more-info
                filter:
                  include:
                    - name: attributes.device_class
                      operator: '='
                      value: power
                  exclude:
                    - name: entity_id
                      operator: matches
                      value: /.*(battery|_electric_w_value).*/
                bulk_rename:
                  - from: / Puissance$/
                  - from: /_power_power$/

Screenshots image

Version v3.2.1

Gonioul commented 1 month ago

No progress?