I can't find a reason why the font color doesn't switch in the code above.
Thanks for the advice
type: custom:mushroom-light-card
entity: light.svetlo_garaz_vstupna_hala_chodba_hala
name: Svetlá on/off /all
icon_color: white
secondary_info: state
show_brightness_control: false
collapsible_controls: false
tap_action:
action: toggle
grid_options:
columns: 8
rows: auto
card_mod:
style: |
ha-card {
background-color:
{% if is_state('light.svetlo_garaz_vstupna_hala_chodba_hala', 'on') %}
orange; /* Oranžová keď je aktívne */
{% else %}
dar kgray; /* Dark gray keď je neaktívne */
{% endif %}
color:
{% if is_state('light.svetlo_garaz_vstupna_hala_chodba_hala', 'on') %}
black; /* Čierne písmo keď je aktívne */
{% else %}
white; /* Biele písmo keď je neaktívne */
{% endif %}
border: none;
transition: background-color 0.5s ease-in-out, color 0.5s ease-in-out;
}
You may want to ask here…
You are not using the correct fields for the font.
type: custom:mushroom-light-card
entity: light.pc_lights
card_mod:
style: |
ha-card {
background: grey;
--card-primary-color: orange;
--card-secondary-color: red;
}
Going forward, I would ask Mushroom related questions in the main Mushroom thread as Sir_Goodenough mentioned.
In addition it is helpful if you post your code using the forum standard. Check out #11
It allows folks that assisting to easily copy and past your code.