I have a MQTT switch configured and tried to change the icon and color depening on state with the next lines in customize.yaml:
switch.thermostaat_woning:
icon_template: >-
{% if is_state("switch.thermostaat_woning", "on") %}
mdi:snowflake
{% else %}
mdi:fire
{% endif %}
icon_color: >-
{% if is_state("switch.thermostaat_woning", "on") %}
255,0,0
{% else %}
0,0,255
{% endif %}
The entity shows the states:
Why is the icon not chaning, neither the color?