thomasloven / lovelace-card-mod

🔹 Add CSS styles to (almost) any lovelace card
MIT License
1.08k stars 168 forks source link

Full icon brightness of dimmable lights #207

Closed herrzettpunkt closed 1 year ago

herrzettpunkt commented 2 years ago

Hello,

I have several RGB LED Bulbs installed but I don't like to have the bulbs colored and/or dimmed on my cards. I just want to have them blue for "off" and yellow for "on" on full brightness. I managed them to have either blue or yellow icons but unfortunately the icons will dim as soon as I dim the bulb itself. How can I fix the brightness level to be 100% even if the bulb dimmed to let's say 25%?

show_name: false
show_icon: true
type: button
tap_action:
  action: toggle
entity: light.tv_licht
name: TV
icon: mdi:television-ambient-light
card_mod:
  style: |
    :host {
     --card-mod-icon-color:
      {% if states(config.entity) == 'on' %} 
        yellow
      {% elif states(config.entity) == 'off' %} 
        steelblue
      {% endif %}
      }
Bildschirmfoto 2022-06-06 um 02 49 12
thomasloven commented 1 year ago

There's a new variable for this now. --card-mod-icon-dim: none