-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathufh-manifold-upper.yaml
205 lines (195 loc) · 5.21 KB
/
ufh-manifold-upper.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
<<: !include secrets.yaml
esphome:
name: ufh-manifold-upper
platform: esp8266
board: nodemcu
# Enable logging
logger:
level: DEBUG
captive_portal:
output:
- platform: gpio
pin: GPIO16
id: 'gpio_zone_1'
- platform: gpio
pin: GPIO14
id: 'gpio_zone_2'
- platform: gpio
pin: GPIO12
id: 'gpio_zone_3'
- platform: gpio
pin: GPIO13
id: 'gpio_valve_pump'
- platform: gpio
pin: GPIO15
id: 'gpio_zone_4'
- platform: gpio
pin: GPIO0
id: 'gpio_zone_5'
- platform: gpio
pin: GPIO4
id: 'gpio_zone_6'
- platform: gpio
pin: GPIO5
id: 'gpio_ashp_heat'
switch:
- platform: output
id: 'ashp_heat'
name: "ASHP Heat"
output: 'gpio_ashp_heat'
- platform: output
id: 'zone_1'
name: "Zone 1 - Office - Oli"
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 - Bedroom"
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 - Office - Mand"
output: 'gpio_zone_3'
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
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_office_oli_environment_sensor_temperature
entity_id: sensor.office_oli_environment_sensor_temperature
- platform: homeassistant
id: import_bedroom_environment_sensor_temperature
entity_id: sensor.bedroom_environment_sensor_temperature
- platform: homeassistant
id: import_office_mand_environment_sensor_temperature
entity_id: sensor.office_mand_environment_sensor_temperature
- platform: template
name: "Upstairs Average Temperature"
id: upstairs_average_temperature
lambda: |-
float sum = 0;
uint16_t cnt = 0;
if (!std::isnan(id(import_office_oli_environment_sensor_temperature).state)) {
sum += id(import_office_oli_environment_sensor_temperature).state;
cnt += 1;
}
if (!std::isnan(id(import_bedroom_environment_sensor_temperature).state)) {
sum += id(import_bedroom_environment_sensor_temperature).state;
cnt += 1;
}
if (!std::isnan(id(import_office_mand_environment_sensor_temperature).state)) {
sum += id(import_office_mand_environment_sensor_temperature).state;
cnt += 1;
}
if (cnt == 0) {
return NAN;
} else {
return (sum / cnt);
}
climate:
- platform: thermostat
name: "Upstairs - Global"
sensor: upstairs_average_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_1
- switch.turn_on: zone_2
- switch.turn_on: zone_3
idle_action:
- switch.turn_off: zone_1
- switch.turn_off: zone_2
- switch.turn_off: zone_3
- platform: thermostat
name: "Office - Oli - Thermostat"
sensor: import_office_oli_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_1
idle_action:
- switch.turn_off: zone_1
- platform: thermostat
name: "Bedroom - Thermostat"
sensor: import_bedroom_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: "Office - Mand - Thermostat"
sensor: import_office_mand_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_3
idle_action:
- switch.turn_off: zone_3