Hello, congratulations for the interface, it is wonderful.
I use card-mod and Iâm trying to make an icon animation in a mushroom-entity-card but I canât access the icon part.
For the styles of the car, I have put the following and it works very well but to make an animation in the icon nothing at all. Does anyone know what I should put?
icon_color: yellow
style: |
ha-card {
{% if is_state(âswitch.luz_bano_papas_l2â,âonâ) %}
âcard-mod-icon: mdi:fan;
{% else %}
âcard-mod-icon: mdi:bathtub-outline;
{% endif %}
margin: 1px;
box-shadow: 1px 1px 3px 1px gray;
{% if is_state(âswitch.light_bathroom_papas_l2â,âoffâ) %}
âcolor1: {{states(âinput_text.colorâ)}};
{% else %}
âcolor1: yellow;
{% endif %}
âcolor2: {{states(âinput_text.colorâ)}};
border-radius:5px;animation: animation 4s line inf2inite;
-webkit-animation-name: test;
-webkit-animation-duration: 2.5s;
-webkit-animation-iteration-count: infinite;
-webkit-animation-direction: alternate;
-webkit-animation-timing-function: linear;
}
@keyframes test {
00%, 09%{background: linear-gradient(to right, transparent 80%, var(âcolor1, var(âcolor2)) 130%);}
10%, 19%{background: linear-gradient(to right, transparent 81%, var(âcolor1, var(âcolor2)) 130%);}
20%, 29%{background: linear-gradient(to right, transparent 82%, var(âcolor1, var(âcolor2)) 130%);}
30%, 39%{background: linear-gradient(to right, transparent 83%, var(âcolor1, var(âcolor2)) 130%);}
40%, 49%{background: linear-gradient(to right, transparent 84%, var(âcolor1, var(âcolor2)) 130%);}
50%, 59%{background: linear-gradient(to right, transparent 85%, var(âcolor1, var(âcolor2)) 130%);}
60%, 69%{background: linear-gradient(to right, transparent 84%, var(âcolor1, var(âcolor2)) 130%);}
70%, 79%{background: linear-gradient(to right, transparent 83%, var(âcolor1, var(âcolor2)) 130%);}
80%, 89%{background: linear-gradient(to right, transparent 82%, var(âcolor1, var(âcolor2)) 130%);}
90%, 99%{background: linear-gradient(to right, transparent 81%, var(âcolor1, var(âcolor2)) 130%);}
100%{background: linear-gradient(to right, transparent 80%, var(âcolor1, var(âcolor2)) 130%);}
}
}
Thanks!!