Hello, I am building my room cards and have them largely planned out. I am stuck with figuring out how to change a mushroom chip icon from lightbulb-outline to lightbulb-on-outline. I have read a ton of articles both for mushroom cards and CSS but I’m missing something. Here is what I have so far;
You will see a lightbulb that changes colour and that’s about as far as I’ve got.
this is the code
...
- type: conditional
conditions:
- entity: switch.test
state: 'on'
chip:
type: template
icon: mdi:lightbulb-outline
card_mod:
style: |
@keyframes glow {
0% {color: red;}
100% {color: yellow;}
}
ha-card {
animation: glow linear alternate infinite;
animation-duration: 2s;
}
...
I have tried
- type: conditional
conditions:
- entity: switch.test
state: 'on'
chip:
type: template
icon: mdi:lightbulb-outline
card_mod:
style: |
@keyframes glow {
0% {icon: mdi:lightbulb-outline;}
100% {icon: mdi:lightbulb-on-outline;}
}
ha-card {
animation: glow linear alternate infinite;
animation-duration: 2s;
}
If this is even possible and I imagine it is as you can do something similar in CSS (only changing a PNG not MDI icon) then I suspect I have the syntax wrong but I think I’ve reached the edges of my knowledge thus far and cant seem to find more information to help me progress. I would appreciate anyone either helping with a code correction or pointing me in the right direction in terms of knowledge.
Thanks in advance