Iāve been following this thread to get my chips animated and making good progress. I do have one issue, when the āmonitorā chip animation is used it is moving the chip lower on the card. Any ideas what could be causing this?
type: custom:stack-in-card
cards:
- type: custom:mushroom-template-card
primary: Master Bedroom
secondary: >-
{{ states("sensor.master_bedroom_temperature_2") | round(0) }} Ā°F / {{
states("sensor.master_bedroom_humidity") | round (0) }} %
entity: group.master_bedroom_lights
icon: >-
{% if is_state('group.master_bedroom_lights', 'on') or
is_state('input_boolean.probably_sleeping', 'on') %}
mdi:bed
{% else %}
mdi:bed-empty
{% endif %}
icon_color: >-
{% if is_state('group.master_bedroom_lights', 'on') or
is_state('input_boolean.probably_sleeping', 'on') %}
green
{% else %}
blue
{% endif %}
tap_action:
action: navigate
navigation_path: master_bedroom
layout: horizontal
multiline_secondary: false
card_mod:
style: |
:host([dard-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: 66px;
margin-left: -18px !important;
--ha-card-border-width: 0;
}
- type: custom:mushroom-chips-card
chips:
- type: template
icon: >-
{% if is_state('media_player.master_bedroom_display', 'playing') %}
mdi:speaker {% else %} mdi:speaker-off {% endif %}
icon_color: >-
{% if is_state('media_player.master_bedroom_display', 'playing') %}
blue {% endif %}
entity: media_player.master_bedroom_display
tap_action:
action: more-info
- type: conditional
conditions:
- entity: media_player.master_bedroom
state_not: playing
chip:
type: template
icon: mdi:monitor-off
entity: media_player.master_bedroom
tap_action:
action: more-info
- type: conditional
conditions:
- entity: media_player.master_bedroom
state: playing
chip:
type: template
icon: mdi:monitor
entity: media_player.master_bedroom
tap_action:
action: more-info
- type: template
icon: mdi:fan
icon_color: >-
{% if is_state('fan.master_bedroom_ceiling_fan', 'on') %} green {%
endif %}
entity: fan.master_bedroom_ceiling_fan
tap_action:
action: toggle
hold_action:
action: more-info
- type: template
icon: mdi:ceiling-light
icon_color: >-
{% if is_state('switch.master_bedroom_ceiling_light', 'on') %} yellow
{% endif %}
entity: switch.master_bedroom_ceiling_light
tap_action:
action: toggle
- type: template
icon: mdi:lamp
icon_color: >-
{% if
is_state('light.in_wall_smart_toggle_dimmer_master_bedroom_lamp','on') %}
yellow
{% endif %}
entity: light.in_wall_smart_toggle_dimmer_master_bedroom_lamp
tap_action:
action: toggle
alignment: end
card_mod:
style:
mushroom-template-chip:nth-child(1)$: |
ha-icon {
{{ 'animation: beat 1.3s ease-out infinite both;' if is_state('media_player.ally_bedroom_speaker', 'playing') }}
transform-origin: 50% 60%;
}
@keyframes beat {
0% { transform: scale(1); }
10% { transform: scale(1.1); }
17% { transform: scale(1.05); }
33% { transform: scale(1.25); }
60% { transform: scale(1); }
}
mushroom-conditional-chip:nth-child(3):
mushroom-template-chip$: |
ha-icon:before {
content: "";
position: absolute;
width: 40%;
height: 30%;
margin: 6%;
animation: refresh 300ms linear infinite;
}
@keyframes refresh {
0% { background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%, transparent 100%); }
25% { background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.3) 25%, transparent 100%); }
50% { background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%); }
75% { background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.3) 75%, transparent 100%); }
100% { background: linear-gradient(180deg, transparent 0%, transparent 50%, rgba(255, 255, 255, 0.3) 100%); }
}
mushroom-template-chip:nth-child(4)$: |
ha-icon {
{{ 'animation: rotation 1.5s linear infinite;' if is_state('fan.master_bedroom_ceiling_fan', 'on') }}
}
@keyframes rotation {
0% {transform: rotate(0deg);
}
100% {transform: rotate(360deg);
}
}