custom-cards / bar-card

Customizable Animated Bar card for Home Assistant Lovelace
MIT License
364 stars 52 forks source link

Progress bar without colors in companion app, after 2023.12 Upgrade #177

Closed BunpGhost closed 7 months ago

BunpGhost commented 8 months ago

I use colors and gradient in bar card and after the last companion app upgrade (2023.12) it stopped working. Now it is all blue :)

However, in browser it works as always. Am I doing something wrong or ??

midadami commented 7 months ago

I use colors and gradient in bar card and after the last companion app upgrade (2023.12) it stopped working. Now it is all blue :)

However, in browser it works as always. Am I doing something wrong or ??

I had same problem. Check if you using the new implementation of Card-mod released on 3.4.2. That fixed it for me.

BunpGhost commented 7 months ago

Yes, you are right. But I also had to change the code like so: card_mod: style: |- bar-card-currentbar { background: linear-gradient(to right,{% if is_state("sun.sun", "above_horizon") -%}lightblue 0%,{%- else -%}blue 0%,{%- endif %}orange 100%); clip-path: polygon(0 0, var(--bar-percent) 0, var(--bar-percent) 100%, 0 100%); }

I'll close the issue!