-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathufh-manifold-lower.yaml
309 lines (298 loc) · 8.37 KB
/
ufh-manifold-lower.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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
<<: !include secrets.yaml
esphome:
name: ufh-manifold-lower
platform: esp8266
board: nodemcu
# Enable logging
logger:
level: DEBUG
captive_portal:
output:
- platform: gpio
pin: GPIO16
id: 'gpio_ashp_heat'
- platform: gpio
pin: GPIO14
id: 'gpio_zone_1'
- platform: gpio
pin: GPIO12
id: 'gpio_zone_2'
- platform: gpio
pin: GPIO13
id: 'gpio_zone_3'
- platform: gpio
pin: GPIO15
id: 'gpio_zone_4'
- platform: gpio
pin: GPIO0
id: 'gpio_zone_5'
- platform: gpio
pin: GPIO4
id: 'gpio_valve_pump'
switch:
- platform: output
id: 'ashp_heat'
name: "ASHP Heat"
output: 'gpio_ashp_heat'
- platform: output
id: 'zone_1'
name: "Zone 1 - Living Room"
output: 'gpio_zone_1'
on_turn_off:
then:
script.execute: conditional_off
on_turn_on:
then:
script.execute: heating_on
- platform: output
id: 'zone_2'
name: "Zone 2 - Hallway"
output: 'gpio_zone_2'
on_turn_off:
then:
script.execute: conditional_off
on_turn_on:
then:
script.execute: heating_on
- platform: output
id: 'zone_3'
name: "Zone 3 - Kitchen"
output: 'gpio_zone_3'
on_turn_off:
then:
script.execute: conditional_off
on_turn_on:
then:
script.execute: heating_on
- platform: output
id: 'zone_4'
name: "Zone 4 - Bathroom"
output: 'gpio_zone_4'
on_turn_off:
then:
script.execute: conditional_off
on_turn_on:
then:
script.execute: heating_on
- platform: output
id: 'zone_5'
name: "Zone 5 - Snug"
output: 'gpio_zone_5'
on_turn_off:
then:
script.execute: conditional_off
on_turn_on:
then:
script.execute: heating_on
- platform: output
id: 'valve_pump'
name: "Valve/Pump"
output: 'gpio_valve_pump'
script:
- id: conditional_off
then:
if:
condition:
and:
- switch.is_off: zone_1
- switch.is_off: zone_2
- switch.is_off: zone_3
- switch.is_off: zone_4
- switch.is_off: zone_5
then:
- switch.turn_off: ashp_heat
- switch.turn_off: valve_pump
- id: heating_on
then:
- switch.turn_on: ashp_heat
- switch.turn_on: valve_pump
sensor:
- platform: homeassistant
id: import_climate_upstairs_global
entity_id: climate.upstairs_global
attribute: current_temperature
- platform: homeassistant
id: import_lounge_floor_temperature
entity_id: sensor.lounge_floor_temperature
on_value_range:
- above: 35.0
then:
- switch.turn_off: zone_1
- platform: homeassistant
id: import_bathroom_environment_sensor_temperature
entity_id: sensor.bathroom_environment_sensor_temperature
- platform: homeassistant
id: import_hallway_environment_sensor_temperature
entity_id: sensor.hallway_environment_sensor_temperature
- platform: homeassistant
id: import_snug_environment_sensor_temperature
entity_id: sensor.snug_environment_sensor_temperature
- platform: homeassistant
id: import_living_room_environment_sensor_temperature
entity_id: sensor.living_room_environment_sensor_temperature
- platform: homeassistant
id: import_kitchen_environment_sensor_temperature
entity_id: sensor.kitchen_environment_sensor_temperature
- platform: template
name: "Living Room / Diner Average Temperature"
id: kitchen_living_room_average
lambda: |-
float sum = 0;
uint16_t cnt = 0;
if (!std::isnan(id(import_kitchen_environment_sensor_temperature).state)) {
sum += id(import_kitchen_environment_sensor_temperature).state;
cnt += 1;
}
if (!std::isnan(id(import_living_room_environment_sensor_temperature).state)) {
sum += id(import_living_room_environment_sensor_temperature).state;
cnt += 1;
}
if (cnt == 0) {
return NAN;
} else {
return (sum / cnt);
}
- platform: template
name: "Ground Floor Average Temperature"
id: ground_floor_average
lambda: |-
float sum = 0;
uint16_t cnt = 0;
if (!std::isnan(id(import_bathroom_environment_sensor_temperature).state)) {
sum += id(import_bathroom_environment_sensor_temperature).state;
cnt += 1;
}
if (!std::isnan(id(import_living_room_environment_sensor_temperature).state)) {
sum += id(import_living_room_environment_sensor_temperature).state;
cnt += 1;
}
if (!std::isnan(id(import_kitchen_environment_sensor_temperature).state)) {
sum += id(import_kitchen_environment_sensor_temperature).state;
cnt += 1;
}
if (!std::isnan(id(import_hallway_environment_sensor_temperature).state)) {
sum += id(import_hallway_environment_sensor_temperature).state;
cnt += 1;
}
if (!std::isnan(id(import_snug_environment_sensor_temperature).state)) {
sum += id(import_snug_environment_sensor_temperature).state;
cnt += 1;
}
if (cnt == 0) {
return NAN;
} else {
return (sum / cnt);
}
climate:
- platform: thermostat
name: "Living Room / Diner - Thermostat"
sensor: kitchen_living_room_average
preset:
- name: Eco
default_target_temperature_low: 16 °C
- name: Normal
default_target_temperature_low: 19 °C
- name: Comfort
default_target_temperature_low: 21 °C
min_heating_off_time: 300s
min_heating_run_time: 300s
min_idle_time: 30s
heat_action:
- switch.turn_on: zone_1
- switch.turn_on: zone_3
idle_action:
- switch.turn_off: zone_1
- switch.turn_off: zone_3
- platform: thermostat
name: "Hallway - Thermostat"
sensor: import_hallway_environment_sensor_temperature
preset:
- name: Eco
default_target_temperature_low: 16 °C
- name: Normal
default_target_temperature_low: 19 °C
- name: Comfort
default_target_temperature_low: 21 °C
min_heating_off_time: 300s
min_heating_run_time: 300s
min_idle_time: 30s
heat_action:
- switch.turn_on: zone_2
idle_action:
- switch.turn_off: zone_2
- platform: thermostat
name: "Upstairs - Hallway Booster"
sensor: import_climate_upstairs_global
preset:
- name: Eco
default_target_temperature_low: 16 °C
- name: Normal
default_target_temperature_low: 19 °C
- name: Comfort
default_target_temperature_low: 21 °C
min_heating_off_time: 300s
min_heating_run_time: 300s
min_idle_time: 30s
heat_action:
- switch.turn_on: zone_2
idle_action:
- switch.turn_off: zone_2
- platform: thermostat
name: "Bathroom - Thermostat"
sensor: import_bathroom_environment_sensor_temperature
preset:
- name: Eco
default_target_temperature_low: 16 °C
- name: Normal
default_target_temperature_low: 19 °C
- name: Comfort
default_target_temperature_low: 21 °C
min_heating_off_time: 300s
min_heating_run_time: 300s
min_idle_time: 30s
heat_action:
- switch.turn_on: zone_4
idle_action:
- switch.turn_off: zone_4
- platform: thermostat
name: "Snug - Thermostat"
sensor: import_snug_environment_sensor_temperature
preset:
- name: Eco
default_target_temperature_low: 16 °C
- name: Normal
default_target_temperature_low: 19 °C
- name: Comfort
default_target_temperature_low: 21 °C
min_heating_off_time: 300s
min_heating_run_time: 300s
min_idle_time: 30s
heat_action:
- switch.turn_on: zone_5
idle_action:
- switch.turn_off: zone_5
- platform: thermostat
name: "Ground Floor - Thermostat"
sensor: ground_floor_average
preset:
- name: Eco
default_target_temperature_low: 16 °C
- name: Normal
default_target_temperature_low: 19 °C
- name: Comfort
default_target_temperature_low: 21 °C
min_heating_off_time: 300s
min_heating_run_time: 300s
min_idle_time: 30s
heat_action:
- switch.turn_on: zone_1
- switch.turn_on: zone_2
- switch.turn_on: zone_3
- switch.turn_on: zone_4
- switch.turn_on: zone_5
idle_action:
- switch.turn_off: zone_1
- switch.turn_off: zone_2
- switch.turn_off: zone_3
- switch.turn_off: zone_4
- switch.turn_off: zone_5