Thanks, that looks promising!
Can you please advise me what the code will look like if I add more cards?
type: custom:mushroom-chips-card
chips:
- type: template
icon: mdi:dishwasher
icon_color: blue
- type: template
icon: mdi:dishwasher
icon_color: red
card_mod:
style:
mushroom-template-chip:nth-child(1)$: |
ha-state-icon {
animation: bounce 1.5s ease-in-out infinite, wash 1s ease-in-out infinite;
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
.: |
mushroom-template-chip:nth-child(1) {
{% if states('input_boolean.vd_mycka') == 'off' %}
margin-right: 0px !important;
display: none !important;
{% else %}
{% endif %}
}
mushroom-template-chip:nth-child(2)$: |
ha-state-icon {
animation: bounce 1.5s ease-in-out infinite, wash 1s ease-in-out infinite;
transform-origin: 50% 75%;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0); }
40% { transform: translateY(-1.2px) rotate(5deg); }
60% { transform: translateY(-1.1px) rotate(-4deg); }
}
@keyframes wash {
50% { clip-path: polygon(0 0, 0 100%, 35% 100%, 36% 74%, 31% 43%, 61% 40%, 71% 69%, 62% 78%, 36% 73%, 35% 100%, 100% 100%, 100% 0); }
}
.: |
mushroom-template-chip:nth-child(2) {
{% if states('input_boolean.vd_mycka') == 'off' %}
margin-right: 0px !important;
display: none !important;
{% else %}
{% endif %}
}
If I copy the whole thing and just overwrite nth-child(2) it will return an error. It’s definitely just a bad write
Thank you so much for your help, I would never have figured it out on my own !
duplicated mapping key (45:5)
42 | @keyframes wash {
43 | 50% { clip-path: polygon(0 ...
44 | }
45 | .: |
----------^
46 | mushroom-template-chip:nth-ch ...
47 | {% if states('input_boolean ...