Hey guys,
I am trying to implement the trash can animation. However, the stack in card kina gives me a headache.
I have managed to implement everything I wanted with ONE exception. In the screenshot you can kinda see that the border of the card with the lid animation is visible behind the blue.
It IS very hard to see here though. In my dashboard it is a fine gray line surrounding the blue.
I do not know how to get rid of it. Changing the height of the ālid animationā card does not change anything and I do not know what else to change.
Here is the code:
type: conditional
conditions:
- entity: input_boolean.mulltonnenleerung
state: 'off'
card:
type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
icon: mdi:trash-can
entity: calendar.muell
icon_color: |
{% set state=state_attr('calendar.muell','message') %}
{% if state=='Wertstoff' %}
green
{% elif state=='Papier' %}
blue
{% else %}
brown
{% endif %}
tap_action:
action: navigate
navigation_path: /calendar
badge_color: ''
primary: >-
{% if (states('calendar.muell') == 'on') %}
Heute wird die {{state_attr('calendar.muell','message')}}tonne geleert.
{% else %} Morgen wird die
{{state_attr('calendar.muell','message')}}tonne geleert. {% endif %}
secondary: |-
{% if (states('calendar.muell') == 'on') %}
MĆ¼lltonne rausgestellt?
{% else %}
Rausstellen nicht vergessen.
{% endif %}
card_mod:
style: |
ha-card {
border-color: {% if is_state_attr('calendar.muell','message', 'Wertstoff') %} #008000 {% elif is_state_attr('calendar.muell','message', 'Papier') %} #0066ff {% else %} #8B4513 {% endif %};
border-style: inset; border-width: 05px;
background-color: {% if is_state_attr('calendar.muell', 'message', 'Wertstoff') %} rgb( 31 139 34 / 0.1) {% elif is_state_attr('calendar.muell', 'message', 'Papier') %} rgb( 102 163 254 / 0.1) {% else %} rgb( 139 69 19 / 0.1){% endif %};
}
ha-state-icon {
clip-path: inset(25% 0 0 0);
}
- type: custom:mushroom-template-card
icon: mdi:trash-can
icon_color: |
{% set state=state_attr('calendar.muell','message') %}
{% if state=='Wertstoff' %}
green
{% elif state=='Papier' %}
blue
{% else %}
brown
{% endif %}
card_mod:
style: "ha-state-icon {\n animation: lid 1s ease infinite;\n clip-path: inset(0 0 75% 0);\n transform-origin: 50% 25%;\n }\n@keyframes lid {\n 0%, 50%, 80%, 100% { transform: translateY(0); }\n 10% { transform: translateY(-5px) rotate(-37deg); }\n 20% { transform: translateY(-5px) rotate(31deg); }\n 30% { transform: translateY(-5px) rotate(-25deg); }\n 40% { transform: translateY(-5px) rotate(19deg); }\n 60% { transform: translateY(-3px); }\n }\n\nha-card {\n width: 10px;\n top: -72px;\n left: 5px;\n border: none;\n height: 60px; \n }\t\n"
card_mod:
style: |
ha-card {
height: 78px;
}
I appreciate the help!!