Salut
Pour la rotation :
type: custom:mushroom-chips-card
card_mod:
style:
mushroom-template-chip:nth-child(1)$: |
{% if is_state('switch.vmc', 'on') %}
ha-state-icon {
animation: spin 1s linear infinite;
}
{% endif %}
@keyframes spin {
from {transform: rotate(0deg);}
to {transform: rotate(360deg);}
}
chips:
- type: template
entity: switch.vmc
icon: mdi:fan
icon_color: |-
{% if is_state('switch.vmc', 'on') %}
green
{% endif %}
content: |-
{% if is_state('switch.vmc', 'on') %}
{% if is_state('switch.vitesse_vmc', 'off') %}
- 1 -
{% else %}
- 2 -
{% endif %}
{% else %}
Off
{% endif %}
tap_action:
action: more-info
A adapter à tes entités bien sur.
De plus dans ton cas la chip est en seconde position du coup la ligne :
mushroom-template-chip:nth-child(1)$: |
Deviendra :
mushroom-template-chip:nth-child(2)$: |