maxwroc / battery-state-card

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

*FIXED* Colours not showing and sort order wrong #675

Closed julian4646 closed 8 months ago

julian4646 commented 8 months ago

EDIT fixed by adding below (found in the forum): default_state_formatting: false

Describe the bug Not getting colours and sort order wrong

How to reproduce Happened after upgrade to 3.1.6

Expected behavior Colors and sort order like before - lowest to highest

Screenshots see attached

(https://github.com/maxwroc/battery-state-card/assets/36640799/f62f2ac2-12b4-4f29-ab84-13c5699c785e)

Version 3.1.6

YAML configuration



# please paste here your card config

type: custom:battery-state-card
secondary_info: '{last_changed}'
filter:
  include:
    - name: attributes.device_class
      value: battery
  exclude:
    - name: entity_id
      value: sensor.third_reality_inc_3rms16bz_battery
sort:
  by: state
collapse: 4
bulk_rename:
  - from: ' Battery'
  - from: ' level'
colors:
  steps:
    - '#ff0000'
    - '#ffff00'
    - '#00ff00'
  gradient: true
maxwroc commented 8 months ago

Are you sure you're on 3.1.6? Please check the browser console (F12 if you're on PC)

Look for something like the following: image

maxwroc commented 8 months ago

Please re-open if you confirm that the problem exists on v3.1.6.

Pretty often browser caches the old card code and you need to refresh page few times / clear browser cache.