Mushroom-template animation sur valeur entity

blink

Pour l’icone:

card_mod:
  style: |
    ha-state-icon {
      {% if states('binary_sensor.co_cuisine_fenetre_gauche_contact') == 'unknown' %}
      animation: blink 2s linear alternate infinite;
      {% endif %}
    }
    @keyframes blink {
      0% {opacity: 1;}
      100% {opacity: 0.1;}
    }

blink2

Pour le badge:

card_mod:
  style: |
    mushroom-badge-icon {
      {% if states('binary_sensor.co_cuisine_fenetre_gauche_contact') == 'unknown' %}
      animation: blink 2s linear infinite alternate;
      {% endif %}
    }
    @keyframes blink {
      0% {opacity: 1;}
      100% {opacity: 0.1;}
    }
2 « J'aime »