forked from rsciriano/ESPHome-OpenTherm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
opentherm.yaml
146 lines (136 loc) · 3.73 KB
/
opentherm.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
substitutions:
devicename: opentherm
upper_devicename: Opentherm
esphome:
name: $devicename
platform: ESP8266
board: d1_mini
platformio_options:
lib_deps:
- ihormelnyk/OpenTherm Library @ 1.1.3
includes:
- esphome-opentherm/
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
ap:
ssid: "${devicename} Fallback"
password: !secret esphome_fallback_password
captive_portal:
logger:
api:
ota:
custom_component:
- lambda: |-
auto opentherm = new OpenthermComponent();
return {opentherm};
components:
- id: opentherm
output:
- platform: custom
type: float
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) opentherm;
auto opentherm_pid_output = new OpenthermFloatOutput();
openthermComp->set_pid_output(opentherm_pid_output);
App.register_component(opentherm_pid_output);
return {opentherm_pid_output};
outputs:
id: pid_output
#min_power: 30.00%
#max_power: 60.00%
sensor:
- platform: custom
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) opentherm;
return {
openthermComp->boiler_temperature,
openthermComp->external_temperature_sensor,
openthermComp->return_temperature_sensor,
openthermComp->pressure_sensor,
openthermComp->modulation_sensor,
openthermComp->heating_target_temperature_sensor,
openthermComp->pump_operation_hours_sensor
};
sensors:
- name: Boiler Temperature
unit_of_measurement: °C
accuracy_decimals: 1
- name: "External Temperature"
unit_of_measurement: °C
accuracy_decimals: 0
- name: "Return Temperature"
unit_of_measurement: °C
accuracy_decimals: 1
- name: "Heating Water Pressure"
unit_of_measurement: hPa
accuracy_decimals: 1
- name: "Boiler Modulation"
unit_of_measurement: "%"
accuracy_decimals: 0
- name: "Heating Target Temperature"
unit_of_measurement: °C
accuracy_decimals: 1
- name: "Pump Operation Hours"
unit_of_measurement: "H"
accuracy_decimals: 1
- platform: homeassistant
id: temperature_sensor
entity_id: sensor.thermostat_temperature
name: "Actual temperature"
unit_of_measurement: °C
- platform: pid
name: "PID Climate Result"
type: RESULT
- platform: pid
name: "PID Climate HEAT"
type: HEAT
- platform: pid
name: "PID Climate ERROR"
type: ERROR
binary_sensor:
- platform: custom
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) opentherm;
return {openthermComp->flame};
binary_sensors:
- name: "Flame"
#device_class: heat
switch:
- platform: custom
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) opentherm;
return {openthermComp->thermostatSwitch};
switches:
name: "Disable PID"
- platform: template
name: "PID Climate Autotune"
turn_on_action:
- climate.pid.autotune: pid_climate
climate:
- platform: custom
lambda: |-
OpenthermComponent *openthermComp = (OpenthermComponent*) opentherm;
return {
openthermComp->hotWaterClimate,
openthermComp->heatingWaterClimate
};
climates:
- id: hot_water
name: "Hot water"
- id: heating_water
name: "Heating water"
- platform: pid
id: pid_climate
name: "PID Climate Controller"
visual:
min_temperature: 16 °C
max_temperature: 28 °C
temperature_step: 0.5 °C
sensor: temperature_sensor
default_target_temperature: 20°C
heat_output: pid_output
control_parameters:
kp: 0.40780
ki: 0.00003
kd: 0.00000