-
Notifications
You must be signed in to change notification settings - Fork 1
/
card_example.yaml
27 lines (27 loc) · 1.13 KB
/
card_example.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
- type: entities
entities:
- entity: sensor.chmi_alert
card_mod:
style:
hui-sensor-entity-row$:
hui-generic-entity-row$: |
.value {
font-weight: bold; font-size: 1.6em;
{% if state_attr('sensor.chmi_alert', 'severityLevel') == 0 %}
color: #28d861 !important; /* no alert */
{% endif %}
{% if state_attr('sensor.chmi_alert', 'severityLevel') == 1 %}
color: #99ff00 !important; /* unknown/outlook */
{% endif %}
{% if state_attr('sensor.chmi_alert', 'severityLevel') == 2 %}
color: #99ff00 !important; /* minor */
{% endif %}
{% if state_attr('sensor.chmi_alert', 'severityLevel') == 3 %}
color: #ffff00 !important; /* moderate */
{% endif %}
{% if state_attr('sensor.chmi_alert', 'severityLevel') == 4 %}
color: #f38a39 !important; /* severe */
{% endif %}
{% if state_attr('sensor.chmi_alert', 'severityLevel') == 5 %}
color: #ff0000 !important; /* extreme */
{% endif %}