-
Notifications
You must be signed in to change notification settings - Fork 0
/
scripts.yaml
133 lines (133 loc) · 3.49 KB
/
scripts.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
warmwater_settings:
alias: Warmwater Settings
sequence:
# remember old settings
- variables:
old_setpoint: "{{ states('number.ebusd_ctlv2_hwctempdesired_tempv') }}"
old_maxchargetime:
"{{ states('number.ebusd_ctlv2_hwcmaxchargetime_minutes2')
}}"
old_chargehysteresis:
"{{ states('number.ebusd_ctlv2_hwcchargehysteresis_calibrationv')
}}"
old_hwcmode: "{{ states('select.ebusd_hmu_hwcmode')}}"
# set all new settings
- action: select.select_option
target:
entity_id: select.ebusd_hmu_hwcmode
data:
option: "{{ hwcmode }}"
- action: number.set_value
target:
entity_id: number.ebusd_ctlv2_hwcmaxchargetime_minutes2
data:
value: "{{ maxchargetime }}"
- action: water_heater.set_temperature
data:
operation_mode: "{{ opmode }}"
temperature: "{{ setpoint }}"
target:
entity_id: water_heater.ctlv2_hotwater_vaillant
- action: number.set_value
target:
entity_id: number.ebusd_ctlv2_hwcchargehysteresis_calibrationv
data:
value: "{{ chargehysteresis }}"
# wait for hotwater setpoint to be reached or timeout
- wait_template:
"{{ state_attr('water_heater.ctlv2_hotwater_vaillant', 'current_temperature')
> setpoint }}"
continue_on_timeout: true
timeout: 00:{{ timeout }}
# restore old settings if requested
- if:
- condition: template
value_template: "{{ restore == 1 }}"
then:
- action: water_heater.set_temperature
target:
entity_id: water_heater.ctlv2_hotwater_vaillant
data:
operation_mode: auto
temperature: "{{ old_setpoint }}"
- action: number.set_value
target:
entity_id: number.ebusd_ctlv2_hwcmaxchargetime_minutes2
data:
value: "{{ old_maxchargetime }}"
- action: number.set_value
target:
entity_id: number.ebusd_ctlv2_hwcchargehysteresis_calibrationv
data:
value: "{{ old_chargehysteresis }}"
- action: select.select_option
target:
entity_id: select.ebusd_hmu_hwcmode
data:
option: "{{ old_hwcmode }}"
description: ""
fields:
setpoint:
selector:
number:
min: 15
max: 70
step: 1
name: Setpoint
required: true
maxchargetime:
selector:
number:
min: 60
max: 180
step: 1
name: MaxChargeTime
required: true
chargehysteresis:
selector:
number:
min: 5
max: 20
step: 1
name: ChargeHysteresis
required: true
restore:
selector:
number:
min: 0
max: 1
step: 1
name: Restore
required: true
description: Restore
timeout:
selector:
number:
min: 0
max: 180
step: 1
name: Timeout
default: 0
required: true
opmode:
selector:
select:
options:
- auto
- heat
name: OpMode
default: heat
required: true
hwcmode:
selector:
select:
options:
- eco
- normal
name: HwcMode
default: eco
required: true
# allow 3 incarnations to be queued as
# hotwater summer / winter automation might kick in while running
mode: queued
max: 3