this bit does nothing --icon-animation
is not a thing anymore. and you dont have any keyframes for an animation called flame.
consider keyframes as being entirely seperate. dont add stuff to them, and keep them out of other elements. so like this initially:
card_mod:
style:
mushroom-shape-icon$: |
.shape {
--shape-animation: ping 1.5s infinite;
}
@keyframes ping {
0% { box-shadow: 0 0 1px 1px rgba(var(--rgb-teal), 0.3) inset; }
50% { box-shadow: 0 0 5px 15px transparent inset; }
51% { box-shadow: 0 0 1px 1px rgba(var(--rgb-red), 0.3); }
100% { box-shadow: 0 0 5px 15px transparent; }
}
.: |
ha-state-icon {
animation: clip 1.5s infinite;
}
@keyframes clip {
0% { clip-path: circle(13.0% at 50% 50%); }
100% { clip-path: circle(50.0% at 50% 50%); }
}
you can then wrap the bit that is applying the animation in your if statement. like this:
card_mod:
style:
mushroom-shape-icon$: |
.shape {
{% if is_state('input_boolean.asus_toggle','on') %}
--shape-animation: ping 1.5s infinite;
{% endif %}
}
@keyframes ping {
0% { box-shadow: 0 0 1px 1px rgba(var(--rgb-teal), 0.3) inset; }
50% { box-shadow: 0 0 5px 15px transparent inset; }
51% { box-shadow: 0 0 1px 1px rgba(var(--rgb-red), 0.3); }
100% { box-shadow: 0 0 5px 15px transparent; }
}
.: |
ha-state-icon {
animation: clip 1.5s infinite;
}
@keyframes clip {
0% { clip-path: circle(13.0% at 50% 50%); }
100% { clip-path: circle(50.0% at 50% 50%); }
}