I see where the problem is, the animated washing machine have two cards stacked, the orange and the blue are two cards…
I got it working on the small card, with this code, but I only want it to animate when sensor.aeg_roupa_appliancestate
is not idle, now its animated all the time, because it don’t have the conditional.
type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Quarto Brinquedos
secondary: >
{{states('sensor.sala_sala_sala_unknown_03_00_00_01_14_a4_temperature')
| round(0) }} °C
icon: mdi:washing-machine
entity: light.toys_room_tx_ultimate_toys_room_tx_ultimate_l1
tap_action:
action: navigate
navigation_path: quarto_brinquedos
hold_action:
action: toggle
icon_color: '{{ ''orange'' if is_state(entity, ''on'') else ''disabled'' }}'
fill_container: true
layout: horizontal
multiline_secondary: false
card_mod:
style: |
ha-state-icon {
animation: shake 400ms ease-in-out infinite;
transform-origin: 50% 58%;
clip-path: polygon(0 0, 0 100%, 35% 100%, 34% 68%, 60% 41%, 71% 56%,
65% 74%, 47% 79%, 32% 69%, 35% 100%, 100% 100%, 100% 0);
}
@keyframes shake {
0%, 100% { transform: translate(0, 0) rotate(0); }
20% { transform: translate(0.4px, -0.4px) rotate(-4deg); }
40% { transform: translate(-0.4px, 0.4px) rotate(4deg); }
60% { transform: translate(0.4px, 0.4px) rotate(-4deg); }
80% { transform: translate(-0.4px, -0.4px) rotate(4deg); }
}
- type: custom:mushroom-template-card
icon: mdi:washing-machine
icon_color: blue
card_mod:
style:
mushroom-shape-icon$: |
.shape {
background: none !important;
}
.: |
ha-card {
width: 66px;
top: -66px;
}
ha-state-icon {
animation: spin 1s linear infinite;
transform-origin: 50% 58%;
clip-path: circle(21.7% at 50% 58%);
}
card_mod:
style: |
ha-card {
height: 66px;
}
EDIT: I managed to put in the big icon also, but the blue part I don’t know how to resize it. In all off them I need the condition
Code for the last buttons:
type: custom:stack-in-card
mode: horizontal
cards:
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Lavandaria
icon: mdi:washing-machine
entity: null
tap_action:
action: navigate
navigation_path: lavandaria
hold_action:
action: toggle
icon_color: '{{ ''orange'' if is_state(entity, ''on'') else ''disabled'' }}'
fill_container: true
layout: horizontal
multiline_secondary: false
card_mod:
style: |
:host([dark-mode]) {
background: rgba(var(--rgb-primary-background-color), 0.2);
}
:host {
background: rgba(var(--rgb-primary-text-color), 0.025);
--mush-icon-size: 76px;
height: 60px;
margin-left: -20px !important;
}
ha-card {
border-width: 0px;
box-shadow: 0px 0px;
}
ha-state-icon {
animation: shake 400ms ease-in-out infinite;
transform-origin: 50% 58%;
clip-path: polygon(0 0, 0 100%, 35% 100%, 34% 68%, 60% 41%, 71% 56%,
65% 74%, 47% 79%, 32% 69%, 35% 100%, 100% 100%, 100% 0);
}
@keyframes shake {
0%, 100% { transform: translate(0, 0) rotate(0); }
20% { transform: translate(0.4px, -0.4px) rotate(-4deg); }
40% { transform: translate(-0.4px, 0.4px) rotate(4deg); }
60% { transform: translate(0.4px, 0.4px) rotate(-4deg); }
80% { transform: translate(-0.4px, -0.4px) rotate(4deg); }
}
- type: custom:mushroom-template-card
icon: mdi:washing-machine
icon_color: blue
card_mod:
style:
mushroom-shape-icon$: |
.shape {
background: none !important;
}
.: |
ha-card {
--mush-icon-size: 76px;
top: -62px;
border-width: 0px;
}
ha-state-icon {
animation: spin 1s linear infinite;
transform-origin: 50% 58%;
clip-path: circle(21.7% at 50% 58%);
}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: cover.lavandaria_janela_lavandaria_17
icon: >
{%- set jalousie =
state_attr('cover.lavandaria_janela_lavandaria_17',
'current_position') | int %} {% if jalousie >= 2 %}
mdi:window-shutter-open
{% else %}
mdi:window-shutter
{% endif %}
icon_color: >
{%- set jalousie =
state_attr('cover.lavandaria_janela_lavandaria_17',
'current_position') | int %} {% if jalousie >= 2 %}
blue
{% else %}
grey
{% endif %}
card_mod:
style: |
ha-card:after {
content: "{{state_attr('cover.lavandaria_janela_lavandaria_17','current_tilt_position') }}";
position: absolute;
display: flex;
justify-content: center;
align-items: center;
background: rgb(var(--rgb-orange));
color: var(--card-background-color);
font-weight: bolder;
border-radius: 50%;
top: -5px;
right: -5px;
width: 16px;
height: 16px;
font-size: 11px;
}
alignment: end
card_mod:
style: |
ha-card {
--chip-border-width: 0px;
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
padding: 0px 10px 0px 0px;
}
card_mod:
style: |
ha-card {
height: 102px;
border-width: 0px;
box-shadow: 0px 0px;
{% if is_state('light.NENHUMA', 'on') %}
background: rgba(255, 152, 0, 0.1);
{% endif %}
}
- type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Sala de estar
secondary: >-
{{
states('sensor.sala_sala_sala_unknown_03_00_00_01_14_a4_temperature')
| round(0) }} °C
icon: mdi:sofa
entity: light.escritorio_tras_interruptor_1
tap_action:
action: navigate
navigation_path: sala-de-estar
hold_action:
action: toggle
icon_color: '{{ ''orange'' if is_state(entity, ''on'') else ''disabled'' }}'
fill_container: true
layout: horizontal
multiline_secondary: false
card_mod:
style: |
:host([dark-mode]) {
background: rgba(var(--rgb-primary-background-color), 0.2);
}
:host {
background: rgba(var(--rgb-primary-text-color), 0.025);
--mush-icon-size: 76px;
height: 60px;
margin-left: -20px !important;
}
ha-card {
border-width: 0px;
box-shadow: 0px 0px;
}
- type: custom:mushroom-chips-card
chips:
- type: template
entity: cover.sala_portas_sala_varanda_15
icon: |
{%- set jalousie = state_attr('cover.sala_portas_sala_varanda_15',
'current_position') | int %} {% if jalousie >= 2 %}
mdi:window-shutter-open
{% else %}
mdi:window-shutter
{% endif %}
icon_color: |
{%- set jalousie = state_attr('cover.sala_portas_sala_varanda_15',
'current_position') | int %} {% if jalousie >= 2 %}
blue
{% else %}
grey
{% endif %}
card_mod:
style: |
ha-card:after {
content: "{{state_attr('cover.sala_portas_sala_varanda_15','current_tilt_position') }}";
position: absolute;
display: flex;
justify-content: center;
align-items: center;
background: rgb(var(--rgb-orange));
color: var(--card-background-color);
font-weight: bolder;
border-radius: 50%;
top: -5px;
right: -5px;
width: 16px;
height: 16px;
font-size: 11px;
}
alignment: end
card_mod:
style: |
ha-card {
--chip-border-width: 0px;
--chip-box-shadow: none;
--chip-background: none;
--chip-spacing: 0;
padding: 0px 10px 0px 0px;
}
card_mod:
style: |
ha-card {
height: 102px;
border-width: 0px;
box-shadow: 0px 0px;
{% if is_state('light.escritorio_tras_interruptor_1', 'on') %}
background: rgba(255, 152, 0, 0.1);
{% endif %}
}
card_mod:
style: |
ha-card {
border-width: 0px;
box-shadow: 0px 0px;
}
Hope you can give me a hand here, my knowledge is not so great, I try and do what I can.