Damn I love this thread (and also part1). It’s so cool to see, what you are all doing here. respect!
I am testing since 2 weeks, but can’t get the simplest thing working correctly
type: custom:mushroom-template-card
icon: mdi:battery
entity: switch.steckdose_wanddisplay_switch_0
icon_color: green
primary: Wandpanel
card_mod:
style:
mushroom-shape-icon: |
ha-state-icon {
animation: charge 3s linear infinite;
}
@keyframes charge {
0%, 80% { clip-path: inset(0 0 0 0); }
10% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 84%, 34% 84%, 34% 100%, 100% 100%, 100% 0%); }
20% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 74%, 34% 74%, 34% 100%, 100% 100%, 100% 0%); }
30% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 64%, 34% 64%, 34% 100%, 100% 100%, 100% 0%); }
40% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 54%, 34% 54%, 34% 100%, 100% 100%, 100% 0%); }
50% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 44%, 34% 44%, 34% 100%, 100% 100%, 100% 0%); }
60% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 34%, 34% 34%, 34% 100%, 100% 100%, 100% 0%); }
70% { clip-path: polygon(0% 0%, 0% 100%, 34% 100%, 34% 24%, 67% 24%, 67% 24%, 34% 24%, 34% 100%, 100% 100%, 100% 0%); }
}
I got this code to show me a loading battery. The battery-icon is always loading.
I try to start a little more simple. I only want to change the color of the icon, but nothing works.
My plan is:
Use this card as a button, if the state is ‘off’ color is grey and no animation. But if the state is ‘on’ I will see this animation and the color green.
I am sure if I do it right, it would be possible to do.
Can anybody give me some help?
Thanks a lot