I found the problem.
type: custom:mushroom-template-card
primary: ''
icon: |-
{% if is_state('switch.kamin','on') -%}
mdi:fireplace
{%- else -%}
mdi:fireplace-off
{%- endif %}
icon_color: |-
{% if is_state('switch.kamin','on') -%}
orange
{%- else -%}
disabled
{%- endif %}
layout: horizontal
entity: switch.kamin
card_mod:
style:
.: |
:host {
--mush-icon-size: 70px;
}
mushroom-shape-icon$: |
ha-icon {
{{'--icon-animation: fire 1500ms infinite;'if is_state('switch.kamin', 'on') }}
transform-origin: 50% 85%;
}
@keyframes fire {
0%, 19%, 23%, 39%, 43%, 49%, 53%, 69%, 73%, 89%, 93%, 100% { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
20%, 40%, 50%, 70%, 90% { clip-path: polygon(0 0, 100% 0, 100% 100%, 65% 99%, 66% 49%, 52% 44%, 33% 48%, 33% 82%, 66% 82%, 69% 100%, 0 100%); }
}