-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
278 lines (276 loc) · 11 KB
/
template.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
#template: !include template.yaml #in configuration.yaml
- sensor: # this line is needed only once
- name: "Outdoor air temp."
unique_id: "Outdoor air temp."
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Outdoor air temp.') }}
- name: "Outdoor heat exchanger temp."
unique_id: "Outdoor heat exchanger temp."
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Outdoor heat exchanger temp.') }}
- name: "Discharge pipe temp."
unique_id: "Discharge pipe temp."
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Discharge pipe temp.') }}
- name: "Suction pipe temp."
unique_id: "Suction pipe temp."
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Suction pipe temp.') }}
- name: "Outdoor heat exchanger mid temp."
unique_id: "Outdoor heat exchanger mid temp."
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Outdoor heat exchanger mid temp.') }}
- name: "Low Pressure"
unique_id: "Low Pressure"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Low Pressure') }}
- name: "DHW setpoint"
unique_id: "DHW setpoint"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'DHW setpoint') }}
- name: "LW setpoint (main)"
unique_id: "LW setpoint (main)"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'LW setpoint (main)') }}
- name: "Outlet PHE(R1T)"
unique_id: "Outlet PHE(R1T)"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Outlet PHE(R1T)') }}
- name: "Outlet BUH(R2T)"
unique_id: "Outlet BUH(R2T)"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Outlet BUH(R2T)') }}
- name: "R32 Liquid temperature(R3T)"
unique_id: "R32 Liquid temperature(R3T)"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Liquid temperature(R3T)') }}
- name: "Inlet temperature(R4T)"
unique_id: "Inlet temperature(R4T)"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Inlet temperature(R4T)') }}
- name: "DHW temperature(R5T)"
unique_id: "DHW temperature(R5T)"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'DHW temperature(R5T)') }}
- name: "Remocon thermistor"
unique_id: "Remocon thermistor"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Remocon thermistor') }}
- name: "Discharge Temp Drop"
unique_id: "Discharge Temp Drop"
unit_of_measurement: '°C'
device_class: temperature
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'discharge Temp Drop') }}
- name: "INV primary current (A)"
unique_id: "INV primary current (A)"
unit_of_measurement: 'A'
device_class: current
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'INV primary current (A)') }}
- name: "INV secondary current (A)"
unique_id: "INV secondary current (A)"
unit_of_measurement: 'A'
device_class: current
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'INV secondary current (A)') }}
- name: "Pressure"
unique_id: "Pressure"
unit_of_measurement: '°C'
device_class: pressure
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Pressure')/10 }}
- name: "Voltage (V)"
unique_id: "Voltage (V)"
unit_of_measurement: 'V'
device_class: voltage
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Voltage (V)') }}
- name: "Voltage (N-phase) (V)"
unique_id: "Voltage (N-phase) (V)"
unit_of_measurement: 'V'
device_class: voltage
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Voltage (N-phase) (V)') }}
- name: "Flow sensor (l/min)"
unique_id: "Flow sensor (l/min)"
unit_of_measurement: 'L/min'
icon: mdi:waves-arrow-right
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Flow sensor (l/min)') }}
- name: "Fan 1 (step)"
unique_id: "Fan 1 (step)"
unit_of_measurement: 'RPM'
icon: mdi:fan
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Fan 1 (step)')*10 }}
- name: "Water pump signal (0:max-100:stop)"
unique_id: "Water pump signal (0:max-100:stop)"
unit_of_measurement: 'RPM'
icon: mdi:pump
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Water pump signal (0:max-100:stop)') }}
- name: "INV frequency 1 (rps)"
unique_id: "INV frequency 1 (rps)"
unit_of_measurement: 'Hz'
icon: mdi:sine-wave
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'INV frequency 1 (rps)') }}
- name: "INV frequency 2 (rps)"
unique_id: "INV frequency 2 (rps)"
unit_of_measurement: 'Hz'
icon: mdi:sine-wave
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'INV frequency 2 (rps)') }}
- name: "Operation Mode"
unique_id: "Operation Mode"
icon: mdi:heat-wave
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Operation Mode') }}
- name: "Error Code"
unique_id: "Error Code"
icon: mdi:message-alert
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Error Code') }}
- name: "Error detailed code"
unique_id: "Error detailed code"
icon: mdi:message-alert
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Error detailed code') }}
- name: "Error type"
unique_id: "Error type"
icon: mdi:message-alert
state_class: measurement
state: >
{{ state_attr('sensor.althermasensors', 'Error type') }}
- name: "COP"
unique_id: "COP"
icon: mdi:poll
state_class: measurement
state: >
{% if is_state_attr('sensor.althermasensors','Operation Mode', 'Heating') and is_state_attr('sensor.althermasensors','Freeze Protection', 'OFF') %}
{{
((state_attr('sensor.althermasensors','Flow sensor (l/min)')| float * 0.06 * 1.16 * (state_attr('sensor.althermasensors','Outlet PHE(R1T)') | float - state_attr('sensor.althermasensors','Inlet temperature(R4T)')|float) )
/
(state_attr('sensor.althermasensors','INV secondary current (A)') | float * state_attr('sensor.althermasensors','Voltage (N-phase) (V)')|float / 1000))
|round(2) }}
{% else %} 0.0 {%endif%}
- name: "ΔT Q"
unique_id: "ΔT Q"
state_class: measurement
icon: mdi:thermometer-plus
state: >
{{ ( ((state_attr('sensor.althermasensors','Outlet PHE(R1T)') | float - state_attr('sensor.althermasensors','Inlet temperature(R4T)')|float) ) )
|round(2) }}
- name: "KW Q Heating"
unique_id: "KW Q heating"
state_class: measurement
#device_class: power
icon: mdi:radiator
#ΔQ = m° Cp ΔT.
#ΔQ = Rate of heat transfer (kW)
#m° = Mass flow rate (kg/s or LPS)
#ΔT = Temperature difference in Kelvin
#Cp = Specific heat at constant pressure (kJ/kg K) 4.184 J⋅kg−1⋅K−1.
state: >
{{ (state_attr('sensor.althermasensors','Flow sensor (l/min)')/60 | float * 4.184 * ((state_attr('sensor.althermasensors','Outlet PHE(R1T)') | float - state_attr('sensor.althermasensors','Inlet temperature(R4T)')|float) ) )
|round(2) }}
- binary_sensor:
- name: "Thermostat ON/OFF"
unique_id: "Thermostat ON/OFF"
icon: mdi:thermostat
device_class: power
state: >
{{ state_attr('sensor.althermasensors', 'Thermostat ON/OFF') }}
- name: "Thermostat2 ON/OFF"
unique_id: "Thermostat2 ON/OFF"
device_class: power
icon: mdi:thermostat
state: >
{{ state_attr('sensor.althermasensors', 'Thermostat2 ON/OFF') }}
- name: "Water flow switch"
unique_id: "Water flow switch"
device_class: power
icon: mdi:waves-arrow-right
state: >
{{ state_attr('sensor.althermasensors', 'Water flow switch') }}
- name: "Pump Output"
unique_id: "Pump Output"
icon: mdi:waves-arrow-right
device_class: power
state: >
{{ state_attr('sensor.althermasensors', 'Pump Output') }}
- name: "3way valve(On:DHW_Off:Space)"
unique_id: "3way valve"
device_class: power
icon: mdi:valve
state: >
{{ 'DHW' if is_state_attr('sensor.althermasensors','3way valve', 'ON') else 'Space' }}
- name: "Freeze Protection"
unique_id: "Freeze Protection"
icon: mdi:snowflake-alert
device_class: power
state: >
{{ state_attr('sensor.althermasensors', 'Freeze Protection') }}
- name: "Defrost Operation"
unique_id: "Defrost Operation"
icon: mdi:snowflake-alert
device_class: power
state: >
{{ state_attr('sensor.althermasensors', 'Defrost Operation') }}