Hi all! I have a mushroom-chips-card. What is code for change background colors:
if entity state is A , then color is red; if if entity state is b , then color is blue …
thank you.
now i use this code:
card_mod:
style: |-
ha-card {
border: var(--supplies-button-border) !important;
justify-content: center !important;
{% set bl = states(config.entity) | int %}
{% if bl == 'Carta e cartone' %}
--chip-background: rgb(255,179,67);
{% elif bl == 'Plastica') %}
--chip-background: blue;
{% else %}
--text-color: var(--supplies-button-text-color-off);
--card-mod-icon-color: var(--supplies-button-text-color-off);
--chip-background: var(--supplies-button-color-off);
{% endif %}
}
And my second question: is there an hybrid display mode for the number card: a slider with buttons and the value?
I think about this to finelly adjust an slider with large ranges.
Roughly adjust with the slider and the final touch with the buttons.