-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcard_example.yaml
More file actions
33 lines (33 loc) · 1.27 KB
/
card_example.yaml
File metadata and controls
33 lines (33 loc) · 1.27 KB
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
28
29
30
31
32
33
- type: picture
image:
media_content_id: /local/chmi_alert_map.png
tap_action:
action: url
url_path: https://vystrahy-cr.chmi.cz
- 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 %}