forked from rgc99/irrigation_unlimited
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcard_status_markdown.yaml
40 lines (33 loc) · 1.42 KB
/
card_status_markdown.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
28
29
30
31
32
33
34
35
36
37
38
39
40
type: markdown
title: Irrigation Status
content: >
{% set data =
state_attr('irrigation_unlimited.coordinator','configuration')|from_json %}
{% for controller in data.controllers %}
# <ha-icon icon={{ controller.icon }}></ha-icon> {{ controller.name }}
## Zones
{% for zone in controller.zones %}
1. <ha-icon icon={{ zone.icon }}></ha-icon> **{{ zone.name }}** {% if
zone.adjustment %} ({{ zone.adjustment }}) {% endif %} {% if
zone.current_duration %} {{ timedelta(seconds=zone.current_duration | int) }}
{% endif %}
{% endfor %}
## Sequences
{% for sq in controller.sequences %}
1. <ha-icon icon={{ sq.icon }}></ha-icon> **{{ sq.name }}** {% if
sq.adjustment %} ({{ sq.adjustment }}) {% endif %} {% if sq.adjusted_duration
%} {{ timedelta(seconds=sq.adjusted_duration | int) }} {% endif %} {% if
sq.current_duration %} / {{ timedelta(seconds=sq.current_duration | int) }} {%
endif %}
| | | Adjustment | Duration | Current | Zones |
|:---:|:---:| ---:| ---:| ---:| ---:|
{% for sz in sq.sequence_zones -%}
| {{ sz.index + 1 }}. | <ha-icon icon={{ sz.icon }}></ha-icon> | {{
sz.adjustment }} | {% if sz.final_duration %} {{
timedelta(seconds=sz.final_duration | int) }} {% endif %} | {% if
sz.current_duration %} <span style="color:yellow"> {{
timedelta(seconds=sz.current_duration | int) }} </span> {% endif %} | {{
sz.zones }}
{% endfor -%}
{% endfor -%}
{% endfor -%}