simple-thermostat icon indicating copy to clipboard operation
simple-thermostat copied to clipboard

Option to set the background color of the card

Open vbtrek opened this issue 2 years ago • 3 comments

I would like to be able to se the background color of the card using some template code. I just want to set the background color to orange when the thermostat is heating.

Thanks

vbtrek avatar May 24 '22 22:05 vbtrek

I managed to set the background color of the card like this:

style: |
  ha-card {
    {% if is_state_attr(config.entity,'hvac_action', 'heating') -%} 
      --card-background-color: var(--state-climate-heat-color); 
    {%- endif %}
  }

SorenMaagaard avatar Sep 19 '22 10:09 SorenMaagaard

doen`t work, i paste this code, and nothing happent

piotrek2555 avatar Apr 01 '24 12:04 piotrek2555

Woeking on me:

I can install addon card mod from HACKS: ...

card_mod: style: | .mode-item.active.fan_only { --fan_only-color: #00bcd4 } .mode-item.active.heat_cool { --heat_cool-color: #007eff } entity: climate.air_conditioner_none ...

piotrek2555 avatar Apr 01 '24 16:04 piotrek2555