Blinkendes Badge-Icon

Aqara Smarter Gardinenmotor E1(Stangen-Version), Erfordert Zigbee 3.0 Hub, Elektrischer Smart-Vorhangmotor für Fernsteuerung u. Hausautomation, Unterstützt HomeKit, Alexa, Google Assistant und IFTTT
Aqara Smarter Gardinenmotor E1(Stangen-Version), Erfordert Zigbee 3.0 Hub, Elektrischer Smart-Vorhangmotor für Fernsteuerung u. Hausautomation, Unterstützt HomeKit, Alexa, Google Assistant und IFTTT
Unverb. Preisempf.: 95,94 €
86,35 €
Sie sparen 9,59 € (10%)

Wollt ihr eure Badges je nach Zustand „blinken“ lassen?
Das geht mit folgendem Code und custom:bade-card

type: custom:badge-card
name: neu
badges:
  - entity: sensor.wz_temp
    card_mod:
      style: |
        @keyframes blinker { 50% { opacity: 0; } }
        :host {
          {% if states(config.entity)|int > 29 %}
          --label-badge-background-color: red;
          --label-badge-text-color: white;
          animation: blinker 2s linear infinite;
          font-weight: bold;
          text-shadow: 1px 1px #0005;
          {% elif states(config.entity)|int > 27 %}
          --label-badge-background-color: #FF9800;
          --label-badge-text-color: white;
          --label-badge-red: #FF9800;
          font-weight: bold;
          text-shadow: 1px 1px #0005;
          {% elif states(config.entity)|int > 18 %}
          --label-badge-background-color: green;
          --label-badge-text-color: white;
          --label-badge-red: green;
          font-weight: bold;
          text-shadow: 1px 1px #0005;
          {% else %}
          --label-badge-background-color: #039BE5;
          --label-badge-text-color: white;
          --label-badge-red: #039BE5;
          font-weight: bold;
          text-shadow: 1px 1px #0005;
          animation: blinker 2s linear infinite;
          {% endif %}
        }