Skip to content
Discussion options

You must be logged in to vote

Thank you @MrBearPresident for all your help! By editing your solution I was able to create exactly what I wanted (though would be preferable if state colors were built in and matched Home Assistant's built in cards exactly so I'll make FR as you suggested).

Turns out I can use the CSS vars from home assistant's implantation and copy their thresholds!

Below I used your logic and copied the CSS vars and thresholds from the native cards as shown in the file you found. https://github.com/home-assistant/frontend/blob/3fd3c8003a0a1deb18d8959f94ca2dc7b1bfb63d/src/common/entity/color/battery_color.ts

  .bubble-sub-button-1 {
    color: var(${ hass.states['sensor.phone_battery_level'].state >= 70…

Replies: 1 comment 10 replies

Comment options

You must be logged in to vote
10 replies
@StaleLoafOfBread
Comment options

@MrBearPresident
Comment options

@MrBearPresident
Comment options

@StaleLoafOfBread
Comment options

Answer selected by StaleLoafOfBread
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment