-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlovelace-card.yaml
148 lines (136 loc) · 5.78 KB
/
lovelace-card.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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
type: vertical-stack
cards:
- type: entities
entities:
- entity: sensor.pool_water_kalman
- entity: input_boolean.auto_filtration
- entity: input_select.f_mode
show_header_toggle: false
- type: vertical-stack
cards:
- type: conditional
conditions:
- entity: input_select.f_mode
state: abacus
card:
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_datetime.pump_auto_start
- entity: input_number.ratio_abacus
- entity: sensor.auto_cycle_duration_abacus
- entity: sensor.pompe_piscine_on_today
- entity: sensor.last_autostart_triggered_since
show_header_toggle: false
- type: markdown
content: >
| | |
|---|---:|
| **Last auto filtration started at** :
| *{{
as_timestamp(state_attr('automation.pool_filtration_cycle_start',
'last_triggered'))|timestamp_custom('%a, %B %-d, %H:%M', True)
}}* |
| **filtration ran today**:|
*{{states('sensor.pompe_piscine_on_today') }}* hours |
{% if is_state("switch.tz3000_pompe_piscine", "on") -%} | **Auto
filtration will stop at**: | *{{(as_timestamp(now()+ timedelta(
hours = states('sensor.auto_cycle_duration_abacus')|float(1) -
states('sensor.pompe_piscine_on_today')|float(1)|float(1))))|
timestamp_custom("%H:%M:%S")}}* | {%- else -%} | **Auto
filtration will stop at**: |N/A| {%- endif %}
- type: picture
image: /local/IMG/abacus.png
tap_action:
action: call-service
service: input_number.set_value
service_data:
value: 120
target:
entity_id: input_number.ratio_abacus
hold_action:
action: call-service
service: input_number.set_value
service_data:
value: 100
target:
entity_id: input_number.ratio_abacus
- type: conditional
conditions:
- entity: input_select.f_mode
state: standard
card:
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_datetime.pump_auto_start
- entity: sensor.auto_cycle_duration_std
- entity: sensor.pompe_piscine_on_today
- entity: sensor.last_autostart_triggered_since
- type: markdown
content: >
| | |
|---|---:|
| **Last auto filtration started at** :
| *{{
as_timestamp(state_attr('automation.pool_filtration_cycle_start',
'last_triggered'))|timestamp_custom('%a, %B %-d, %H:%M', True)
}}* |
| **filtration ran today**:|
*{{states('sensor.pompe_piscine_on_today') }}* hours |
{% if is_state("switch.tz3000_pompe_piscine", "on") -%} | **Auto
filtration will stop at**: | *{{(as_timestamp(now()+ timedelta(
hours = states('sensor.auto_cycle_duration_std')|float(1) -
states('sensor.pompe_piscine_on_today')|float(1)|float(1))))|
timestamp_custom("%H:%M:%S")}}* | {%- else -%} | **Auto
filtration will stop at**: |N/A| {%- endif %}
- type: picture
image: /local/IMG/standard.png
tap_action:
action: none
hold_action:
action: none
- type: conditional
conditions:
- entity: input_select.f_mode
state: manual
card:
type: vertical-stack
cards:
- type: entities
entities:
- entity: input_datetime.pump_manual_start
- entity: input_number.manual_duration
- entity: sensor.pompe_piscine_on_today
show_header_toggle: false
- type: markdown
content: >-
| | |
|---|---:|
| **Last manual filtration started at** :
| *{{
(as_timestamp(states.automation.pool_manual_filtration_cycle_start.attributes.last_triggered))
| timestamp_custom('%a, %B %-d, %H:%M', True) }}* |
| **filtration ran today**:|
*{{states('sensor.pompe_piscine_on_today') }}* hours |
| **Manual filtration will stop at**: |
*{{(as_timestamp(state_attr('automation.pool_manual_filtration_cycle_start',
'last_triggered')+ timedelta( hours =
states('input_number.manual_duration')|float(1)
)))|timestamp_custom("%H:%M:%S") }}* |
- show_name: true
show_icon: true
type: button
tap_action:
action: call-service
service: automation.trigger
service_data: {}
target:
entity_id: automation.pool_manual_filtration_cycle_start
entity: automation.pool_manual_filtration_cycle_start
icon: mdi:water-sync
icon_height: 50px
name: manual filtration forced start
show_state: false