Hello community,
New card, new configuration, new question.
I’d like to colorize the icon of the new Tile card.
I know that there is a color tag but on one hand the state is not something understood by the card natively and on the other hand, it is not the icon that I want to colorize but the background.
Therefore, I tried this but it was not changing the background:
color: >
{% if is_state('sensor.vaillant', 'démarrée') and is_state('input_select.hass_theme', 'default') %}
#E1FFE1
{% elif is_state('sensor.vaillant', 'démarrée') and not is_state('input_select.hass_theme', 'default') %}
#004000
{% elif not is_state('sensor.vaillant', 'démarrée') and is_state('input_select.hass_theme', 'default') %}
#FFE1E1
{% else %}
#400000
{% endif %}
So I came back to the basics : card-mod
style:
#something, something, something
--shape-color:
{% if is_state('sensor.vaillant', 'démarrée') and is_state('input_select.hass_theme', 'default') %}
#E1FFE1
{% elif is_state('sensor.vaillant', 'démarrée') and not is_state('input_select.hass_theme', 'default') %}
#004000
{% elif not is_state('sensor.vaillant', 'démarrée') and is_state('input_select.hass_theme', 'default') %}
#FFE1E1
{% else %}
#400000
{% endif %}
Do any of you know how to access the right CSS here?
Starting from this in edge chromium (with #FF0000
; that works in the --shape-color
)
I tried this but it is not working
card_mod:
style: |
ha-card .tile .icon-container ha-tile-icon $: |
.shape {
background-color: #FF0000;
}