Is it possible to animate a chip card icon? If so, how? I could not find anything helpful in this post or this other one, this is how my card config looks like:
type: custom:mushroom-chips-card
chips:
- type: entity
entity: person.person_1
hold_action:
action: none
double_tap_action:
action: none
use_entity_picture: true
content_info: name
icon_color: primary
- type: conditional
conditions:
- condition: state
entity: group.all_lights
state: "on"
chip:
type: template
icon: mdi:lightbulb
icon_color: amber
content: >-
{{ expand(states.group.all_lights) | selectattr( 'state', 'eq', 'on') |
list | count }}
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
- type: conditional
conditions:
- condition: state
entity: fan.all_fans
state: "on"
chip:
type: template
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
icon: mdi:fan
icon_color: blue
content: >-
{{ expand(states.fan.all_fans) | selectattr( 'state', 'eq', 'on') | list | count }}
card_mod:
style: |
ha-state-icon {
{% if is_state(config.entity, 'on') %}
animation: rotate .5s infinite linear}
@keyframes rotate {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(-359deg);
}
}
{% endif %}
}
- type: conditional
conditions:
- condition: state
entity: group.door_windows_sensors
state: "on"
chip:
type: template
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
icon: mdi:door-sliding-open
icon_color: red
content: >-
{{ expand(states.group.door_windows_sensors) | selectattr( 'state', 'eq', 'on') | list | count }}
- type: conditional
conditions:
- condition: numeric_state
entity: sensor.batteries_status
below: 20
chip:
type: template
tap_action:
action: none
hold_action:
action: none
double_tap_action:
action: none
icon: mdi:battery-20
icon_color: red
content: >-
{{ expand(states.sensor.batteries_status) | selectattr( 'state', 'eq', '20.0') | list | count }}