#How can I modify this card to set the
1 messages · Page 1 of 1 (latest)
card_mod:
style: |
ha-card {
background: none;
{% if state_attr(config.entity, "color_mode") == "xy" %}
{% set r = state_attr(config.entity, 'rgb_color')[0] %}
{% set g = state_attr(config.entity, 'rgb_color')[1] %}
{% set b = state_attr(config.entity, 'rgb_color')[2] %}
background-color: rgba( {{r}}, {{g}}, {{b}}, 0.2 );
--card-mod-icon-color: rgba( {{r}}, {{g}}, {{b}}, 1 );
//--primary-text-color: rgba( {{r}}, {{g}}, {{b}}, 0.99 );
//--secondary-text-color: rgba( {{r}}, {{g}}, {{b}}, 0.50 );
{% elif state_attr(config.entity, "color_mode") == "color_temp" %}
--card-mod-icon-color: yellow;
--primary-text-color: white;
{% elif is_state(config.entity, 'off') %}
background: none;
--card-mod-icon-color: rgb(28, 28, 28);
--primary-text-color: rgb(128, 128, 128);
{%- endif %}
}```
Instead of using config.entity you can use 'sensor.name_of_your_sensor' in quotes