Wollt ihr eure Badges je nach Zustand „blinken“ lassen?
Das geht mit folgendem Code und custom:bade-card
configuration.yaml
1type: custom:badge-card
2name: neu
3badges:
4 - entity: sensor.wz_temp
5 card_mod:
6 style: |
7 @keyframes blinker { 50% { opacity: 0; } }
8 :host {
9 {% if states(config.entity)|int > 29 %}
10 --label-badge-background-color: red;
11 --label-badge-text-color: white;
12 animation: blinker 2s linear infinite;
13 font-weight: bold;
14 text-shadow: 1px 1px #0005;
15 {% elif states(config.entity)|int > 27 %}
16 --label-badge-background-color: #FF9800;
17 --label-badge-text-color: white;
18 --label-badge-red: #FF9800;
19 font-weight: bold;
20 text-shadow: 1px 1px #0005;
21 {% elif states(config.entity)|int > 18 %}
22 --label-badge-background-color: green;
23 --label-badge-text-color: white;
24 --label-badge-red: green;
25 font-weight: bold;
26 text-shadow: 1px 1px #0005;
27 {% else %}
28 --label-badge-background-color: #039BE5;
29 --label-badge-text-color: white;
30 --label-badge-red: #039BE5;
31 font-weight: bold;
32 text-shadow: 1px 1px #0005;
33 animation: blinker 2s linear infinite;
34 {% endif %}
35 }

