python-qube-heatpump 1.2.3__py3-none-any.whl → 1.3.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- python_qube_heatpump/__init__.py +37 -1
- python_qube_heatpump/client.py +260 -4
- python_qube_heatpump/const.py +36 -0
- python_qube_heatpump/entities/__init__.py +16 -0
- python_qube_heatpump/entities/base.py +77 -0
- python_qube_heatpump/entities/binary_sensors.py +269 -0
- python_qube_heatpump/entities/sensors.py +468 -0
- python_qube_heatpump/entities/switches.py +65 -0
- python_qube_heatpump/models.py +41 -23
- python_qube_heatpump/py.typed +0 -0
- {python_qube_heatpump-1.2.3.dist-info → python_qube_heatpump-1.3.1.dist-info}/METADATA +1 -1
- python_qube_heatpump-1.3.1.dist-info/RECORD +14 -0
- python_qube_heatpump-1.2.3.dist-info/RECORD +0 -8
- {python_qube_heatpump-1.2.3.dist-info → python_qube_heatpump-1.3.1.dist-info}/WHEEL +0 -0
- {python_qube_heatpump-1.2.3.dist-info → python_qube_heatpump-1.3.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
"""Sensor entity definitions for Qube Heat Pump."""
|
|
2
|
+
|
|
3
|
+
from .base import DataType, EntityDef, InputType, Platform
|
|
4
|
+
|
|
5
|
+
_SENSOR_DEFS: tuple[EntityDef, ...] = (
|
|
6
|
+
# Holding register sensors (configuration/setpoints readable as sensors)
|
|
7
|
+
EntityDef(
|
|
8
|
+
key="thermostat_heatsetp_day",
|
|
9
|
+
name="Room setpoint heating (day)",
|
|
10
|
+
address=27,
|
|
11
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
12
|
+
data_type=DataType.FLOAT32,
|
|
13
|
+
platform=Platform.SENSOR,
|
|
14
|
+
unit="°C",
|
|
15
|
+
),
|
|
16
|
+
EntityDef(
|
|
17
|
+
key="thermostat_heatsetp_night",
|
|
18
|
+
name="Room setpoint heating (night)",
|
|
19
|
+
address=29,
|
|
20
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
21
|
+
data_type=DataType.FLOAT32,
|
|
22
|
+
platform=Platform.SENSOR,
|
|
23
|
+
unit="°C",
|
|
24
|
+
),
|
|
25
|
+
EntityDef(
|
|
26
|
+
key="thermostat_coolsetp_day",
|
|
27
|
+
name="Room setpoint cooling (day)",
|
|
28
|
+
address=31,
|
|
29
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
30
|
+
data_type=DataType.FLOAT32,
|
|
31
|
+
platform=Platform.SENSOR,
|
|
32
|
+
unit="°C",
|
|
33
|
+
),
|
|
34
|
+
EntityDef(
|
|
35
|
+
key="thermostat_coolsetp_night",
|
|
36
|
+
name="Room setpoint cooling (night)",
|
|
37
|
+
address=33,
|
|
38
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
39
|
+
data_type=DataType.FLOAT32,
|
|
40
|
+
platform=Platform.SENSOR,
|
|
41
|
+
unit="°C",
|
|
42
|
+
),
|
|
43
|
+
EntityDef(
|
|
44
|
+
key="tapw_timeprogram_dt_bms",
|
|
45
|
+
name="dT flow temperature DHW",
|
|
46
|
+
address=43,
|
|
47
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
48
|
+
data_type=DataType.INT16,
|
|
49
|
+
platform=Platform.SENSOR,
|
|
50
|
+
unit="°C",
|
|
51
|
+
),
|
|
52
|
+
EntityDef(
|
|
53
|
+
key="tapw_timeprogram_dhws",
|
|
54
|
+
name="Minimum temperature DHW",
|
|
55
|
+
address=44,
|
|
56
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
57
|
+
data_type=DataType.FLOAT32,
|
|
58
|
+
platform=Platform.SENSOR,
|
|
59
|
+
unit="°C",
|
|
60
|
+
),
|
|
61
|
+
EntityDef(
|
|
62
|
+
key="tapw_timeprogram_dhws_prog",
|
|
63
|
+
name="DHW temperature (active program)",
|
|
64
|
+
address=46,
|
|
65
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
66
|
+
data_type=DataType.FLOAT32,
|
|
67
|
+
platform=Platform.SENSOR,
|
|
68
|
+
unit="°C",
|
|
69
|
+
),
|
|
70
|
+
EntityDef(
|
|
71
|
+
key="regulation_buffersetp_min",
|
|
72
|
+
name="Minimum setpoint buffer regulation",
|
|
73
|
+
address=99,
|
|
74
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
75
|
+
data_type=DataType.FLOAT32,
|
|
76
|
+
platform=Platform.SENSOR,
|
|
77
|
+
unit="°C",
|
|
78
|
+
),
|
|
79
|
+
EntityDef(
|
|
80
|
+
key="usr_pid_heatsetp",
|
|
81
|
+
name="Heat setpoint (no curve)",
|
|
82
|
+
address=101,
|
|
83
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
84
|
+
data_type=DataType.FLOAT32,
|
|
85
|
+
platform=Platform.SENSOR,
|
|
86
|
+
unit="°C",
|
|
87
|
+
),
|
|
88
|
+
EntityDef(
|
|
89
|
+
key="usr_pid_coolsetp",
|
|
90
|
+
name="Cooling setpoint (no curve)",
|
|
91
|
+
address=103,
|
|
92
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
93
|
+
data_type=DataType.FLOAT32,
|
|
94
|
+
platform=Platform.SENSOR,
|
|
95
|
+
unit="°C",
|
|
96
|
+
),
|
|
97
|
+
EntityDef(
|
|
98
|
+
key="regulation_buffersetp_max",
|
|
99
|
+
name="Max buffer setpoint (cooling)",
|
|
100
|
+
address=169,
|
|
101
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
102
|
+
data_type=DataType.FLOAT32,
|
|
103
|
+
platform=Platform.SENSOR,
|
|
104
|
+
unit="°C",
|
|
105
|
+
),
|
|
106
|
+
EntityDef(
|
|
107
|
+
key="tapw_timeprogram_dhwsetp_nolinq",
|
|
108
|
+
name="User-defined DHW setpoint",
|
|
109
|
+
address=173,
|
|
110
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
111
|
+
data_type=DataType.FLOAT32,
|
|
112
|
+
platform=Platform.SENSOR,
|
|
113
|
+
unit="°C",
|
|
114
|
+
writable=True, # This setpoint can be written via Modbus
|
|
115
|
+
),
|
|
116
|
+
# Input register sensors (read-only)
|
|
117
|
+
EntityDef(
|
|
118
|
+
key="aout_usrpmp_val",
|
|
119
|
+
name="User (CV) pump control %",
|
|
120
|
+
address=4,
|
|
121
|
+
input_type=InputType.INPUT_REGISTER,
|
|
122
|
+
data_type=DataType.FLOAT32,
|
|
123
|
+
platform=Platform.SENSOR,
|
|
124
|
+
unit="%",
|
|
125
|
+
scale=-1.0,
|
|
126
|
+
offset=100.0,
|
|
127
|
+
),
|
|
128
|
+
EntityDef(
|
|
129
|
+
key="aout_srcpmp_val",
|
|
130
|
+
name="Source pump control %",
|
|
131
|
+
address=6,
|
|
132
|
+
input_type=InputType.INPUT_REGISTER,
|
|
133
|
+
data_type=DataType.FLOAT32,
|
|
134
|
+
platform=Platform.SENSOR,
|
|
135
|
+
unit="%",
|
|
136
|
+
scale=-1.0,
|
|
137
|
+
offset=100.0,
|
|
138
|
+
),
|
|
139
|
+
EntityDef(
|
|
140
|
+
key="aout_srcvalve_val",
|
|
141
|
+
name="Source valve control %",
|
|
142
|
+
address=8,
|
|
143
|
+
input_type=InputType.INPUT_REGISTER,
|
|
144
|
+
data_type=DataType.FLOAT32,
|
|
145
|
+
platform=Platform.SENSOR,
|
|
146
|
+
unit="%",
|
|
147
|
+
),
|
|
148
|
+
EntityDef(
|
|
149
|
+
key="dhw_regreq",
|
|
150
|
+
name="DHW regulation demand %",
|
|
151
|
+
address=14,
|
|
152
|
+
input_type=InputType.INPUT_REGISTER,
|
|
153
|
+
data_type=DataType.FLOAT32,
|
|
154
|
+
platform=Platform.SENSOR,
|
|
155
|
+
unit="%",
|
|
156
|
+
),
|
|
157
|
+
EntityDef(
|
|
158
|
+
key="comppwrreq",
|
|
159
|
+
name="Compressor demand %",
|
|
160
|
+
address=16,
|
|
161
|
+
input_type=InputType.INPUT_REGISTER,
|
|
162
|
+
data_type=DataType.FLOAT32,
|
|
163
|
+
platform=Platform.SENSOR,
|
|
164
|
+
unit="%",
|
|
165
|
+
),
|
|
166
|
+
EntityDef(
|
|
167
|
+
key="flow",
|
|
168
|
+
name="Measured Flow",
|
|
169
|
+
address=18,
|
|
170
|
+
input_type=InputType.INPUT_REGISTER,
|
|
171
|
+
data_type=DataType.FLOAT32,
|
|
172
|
+
platform=Platform.SENSOR,
|
|
173
|
+
unit="L/min",
|
|
174
|
+
),
|
|
175
|
+
# Core temperature sensors (mapped to QubeState typed fields)
|
|
176
|
+
EntityDef(
|
|
177
|
+
key="temp_supply",
|
|
178
|
+
name="Supply temperature CV",
|
|
179
|
+
address=20,
|
|
180
|
+
input_type=InputType.INPUT_REGISTER,
|
|
181
|
+
data_type=DataType.FLOAT32,
|
|
182
|
+
platform=Platform.SENSOR,
|
|
183
|
+
unit="°C",
|
|
184
|
+
),
|
|
185
|
+
EntityDef(
|
|
186
|
+
key="temp_return",
|
|
187
|
+
name="Return temperature CV",
|
|
188
|
+
address=22,
|
|
189
|
+
input_type=InputType.INPUT_REGISTER,
|
|
190
|
+
data_type=DataType.FLOAT32,
|
|
191
|
+
platform=Platform.SENSOR,
|
|
192
|
+
unit="°C",
|
|
193
|
+
),
|
|
194
|
+
EntityDef(
|
|
195
|
+
key="temp_source_in",
|
|
196
|
+
name="Source temperature from roof",
|
|
197
|
+
address=24,
|
|
198
|
+
input_type=InputType.INPUT_REGISTER,
|
|
199
|
+
data_type=DataType.FLOAT32,
|
|
200
|
+
platform=Platform.SENSOR,
|
|
201
|
+
unit="°C",
|
|
202
|
+
),
|
|
203
|
+
EntityDef(
|
|
204
|
+
key="temp_source_out",
|
|
205
|
+
name="Source temperature to roof",
|
|
206
|
+
address=26,
|
|
207
|
+
input_type=InputType.INPUT_REGISTER,
|
|
208
|
+
data_type=DataType.FLOAT32,
|
|
209
|
+
platform=Platform.SENSOR,
|
|
210
|
+
unit="°C",
|
|
211
|
+
),
|
|
212
|
+
EntityDef(
|
|
213
|
+
key="temp_room",
|
|
214
|
+
name="Room temperature",
|
|
215
|
+
address=28,
|
|
216
|
+
input_type=InputType.INPUT_REGISTER,
|
|
217
|
+
data_type=DataType.FLOAT32,
|
|
218
|
+
platform=Platform.SENSOR,
|
|
219
|
+
unit="°C",
|
|
220
|
+
),
|
|
221
|
+
EntityDef(
|
|
222
|
+
key="temp_dhw",
|
|
223
|
+
name="DHW temperature",
|
|
224
|
+
address=30,
|
|
225
|
+
input_type=InputType.INPUT_REGISTER,
|
|
226
|
+
data_type=DataType.FLOAT32,
|
|
227
|
+
platform=Platform.SENSOR,
|
|
228
|
+
unit="°C",
|
|
229
|
+
),
|
|
230
|
+
EntityDef(
|
|
231
|
+
key="temp_outside",
|
|
232
|
+
name="Outside temperature",
|
|
233
|
+
address=32,
|
|
234
|
+
input_type=InputType.INPUT_REGISTER,
|
|
235
|
+
data_type=DataType.FLOAT32,
|
|
236
|
+
platform=Platform.SENSOR,
|
|
237
|
+
unit="°C",
|
|
238
|
+
),
|
|
239
|
+
EntityDef(
|
|
240
|
+
key="cop_calc",
|
|
241
|
+
name="COP (calculated)",
|
|
242
|
+
address=34,
|
|
243
|
+
input_type=InputType.INPUT_REGISTER,
|
|
244
|
+
data_type=DataType.FLOAT32,
|
|
245
|
+
platform=Platform.SENSOR,
|
|
246
|
+
),
|
|
247
|
+
EntityDef(
|
|
248
|
+
key="power_thermic",
|
|
249
|
+
name="Current power",
|
|
250
|
+
address=36,
|
|
251
|
+
input_type=InputType.INPUT_REGISTER,
|
|
252
|
+
data_type=DataType.FLOAT32,
|
|
253
|
+
platform=Platform.SENSOR,
|
|
254
|
+
unit="W",
|
|
255
|
+
),
|
|
256
|
+
EntityDef(
|
|
257
|
+
key="status_code",
|
|
258
|
+
name="Status code",
|
|
259
|
+
address=38,
|
|
260
|
+
input_type=InputType.INPUT_REGISTER,
|
|
261
|
+
data_type=DataType.UINT16,
|
|
262
|
+
platform=Platform.SENSOR,
|
|
263
|
+
),
|
|
264
|
+
EntityDef(
|
|
265
|
+
key="regsetp",
|
|
266
|
+
name="Calculated heat pump setpoint",
|
|
267
|
+
address=39,
|
|
268
|
+
input_type=InputType.INPUT_REGISTER,
|
|
269
|
+
data_type=DataType.FLOAT32,
|
|
270
|
+
platform=Platform.SENSOR,
|
|
271
|
+
unit="°C",
|
|
272
|
+
),
|
|
273
|
+
EntityDef(
|
|
274
|
+
key="coolsetp_1",
|
|
275
|
+
name="Cooling setpoint",
|
|
276
|
+
address=41,
|
|
277
|
+
input_type=InputType.INPUT_REGISTER,
|
|
278
|
+
data_type=DataType.FLOAT32,
|
|
279
|
+
platform=Platform.SENSOR,
|
|
280
|
+
unit="°C",
|
|
281
|
+
),
|
|
282
|
+
EntityDef(
|
|
283
|
+
key="heatsetp_1",
|
|
284
|
+
name="Heating setpoint",
|
|
285
|
+
address=43,
|
|
286
|
+
input_type=InputType.INPUT_REGISTER,
|
|
287
|
+
data_type=DataType.FLOAT32,
|
|
288
|
+
platform=Platform.SENSOR,
|
|
289
|
+
unit="°C",
|
|
290
|
+
),
|
|
291
|
+
EntityDef(
|
|
292
|
+
key="compressor_speed",
|
|
293
|
+
name="Current compressor speed",
|
|
294
|
+
address=45,
|
|
295
|
+
input_type=InputType.INPUT_REGISTER,
|
|
296
|
+
data_type=DataType.FLOAT32,
|
|
297
|
+
platform=Platform.SENSOR,
|
|
298
|
+
unit="rpm",
|
|
299
|
+
scale=60.0,
|
|
300
|
+
),
|
|
301
|
+
EntityDef(
|
|
302
|
+
key="dhw_setp",
|
|
303
|
+
name="DHW calculated setpoint",
|
|
304
|
+
address=47,
|
|
305
|
+
input_type=InputType.INPUT_REGISTER,
|
|
306
|
+
data_type=DataType.FLOAT32,
|
|
307
|
+
platform=Platform.SENSOR,
|
|
308
|
+
unit="°C",
|
|
309
|
+
),
|
|
310
|
+
EntityDef(
|
|
311
|
+
key="workinghours_dhw_hrsret",
|
|
312
|
+
name="Working hours DHW",
|
|
313
|
+
address=50,
|
|
314
|
+
input_type=InputType.INPUT_REGISTER,
|
|
315
|
+
data_type=DataType.INT16,
|
|
316
|
+
platform=Platform.SENSOR,
|
|
317
|
+
unit="h",
|
|
318
|
+
),
|
|
319
|
+
EntityDef(
|
|
320
|
+
key="workinghours_heat_hrsret",
|
|
321
|
+
name="Working hours heating",
|
|
322
|
+
address=52,
|
|
323
|
+
input_type=InputType.INPUT_REGISTER,
|
|
324
|
+
data_type=DataType.INT16,
|
|
325
|
+
platform=Platform.SENSOR,
|
|
326
|
+
unit="h",
|
|
327
|
+
),
|
|
328
|
+
EntityDef(
|
|
329
|
+
key="workinghours_cool_hrsret",
|
|
330
|
+
name="Working hours cooling",
|
|
331
|
+
address=54,
|
|
332
|
+
input_type=InputType.INPUT_REGISTER,
|
|
333
|
+
data_type=DataType.INT16,
|
|
334
|
+
platform=Platform.SENSOR,
|
|
335
|
+
unit="h",
|
|
336
|
+
),
|
|
337
|
+
EntityDef(
|
|
338
|
+
key="workinghours_heater1_hrs",
|
|
339
|
+
name="Working hours heater 1",
|
|
340
|
+
address=56,
|
|
341
|
+
input_type=InputType.INPUT_REGISTER,
|
|
342
|
+
data_type=DataType.INT16,
|
|
343
|
+
platform=Platform.SENSOR,
|
|
344
|
+
unit="h",
|
|
345
|
+
),
|
|
346
|
+
EntityDef(
|
|
347
|
+
key="workinghours_heater2_hrs",
|
|
348
|
+
name="Working hours heater 2",
|
|
349
|
+
address=58,
|
|
350
|
+
input_type=InputType.INPUT_REGISTER,
|
|
351
|
+
data_type=DataType.INT16,
|
|
352
|
+
platform=Platform.SENSOR,
|
|
353
|
+
unit="h",
|
|
354
|
+
),
|
|
355
|
+
EntityDef(
|
|
356
|
+
key="workinghours_heater3_hrs",
|
|
357
|
+
name="Working hours heater 3",
|
|
358
|
+
address=60,
|
|
359
|
+
input_type=InputType.INPUT_REGISTER,
|
|
360
|
+
data_type=DataType.INT16,
|
|
361
|
+
platform=Platform.SENSOR,
|
|
362
|
+
unit="h",
|
|
363
|
+
),
|
|
364
|
+
EntityDef(
|
|
365
|
+
key="power_electric",
|
|
366
|
+
name="Total electric power (calculated)",
|
|
367
|
+
address=61,
|
|
368
|
+
input_type=InputType.INPUT_REGISTER,
|
|
369
|
+
data_type=DataType.FLOAT32,
|
|
370
|
+
platform=Platform.SENSOR,
|
|
371
|
+
unit="W",
|
|
372
|
+
),
|
|
373
|
+
EntityDef(
|
|
374
|
+
key="plantsetp",
|
|
375
|
+
name="Plant regulation setpoint",
|
|
376
|
+
address=65,
|
|
377
|
+
input_type=InputType.INPUT_REGISTER,
|
|
378
|
+
data_type=DataType.FLOAT32,
|
|
379
|
+
platform=Platform.SENSOR,
|
|
380
|
+
unit="°C",
|
|
381
|
+
),
|
|
382
|
+
EntityDef(
|
|
383
|
+
key="energy_total_electric",
|
|
384
|
+
name="Total electric consumption (excl. standby)",
|
|
385
|
+
address=69,
|
|
386
|
+
input_type=InputType.INPUT_REGISTER,
|
|
387
|
+
data_type=DataType.FLOAT32,
|
|
388
|
+
platform=Platform.SENSOR,
|
|
389
|
+
unit="kWh",
|
|
390
|
+
),
|
|
391
|
+
EntityDef(
|
|
392
|
+
key="energy_total_thermic",
|
|
393
|
+
name="Total thermic yield",
|
|
394
|
+
address=71,
|
|
395
|
+
input_type=InputType.INPUT_REGISTER,
|
|
396
|
+
data_type=DataType.FLOAT32,
|
|
397
|
+
platform=Platform.SENSOR,
|
|
398
|
+
unit="kWh",
|
|
399
|
+
),
|
|
400
|
+
EntityDef(
|
|
401
|
+
key="modbus_roomtemp",
|
|
402
|
+
name="Linq room temperature",
|
|
403
|
+
address=75,
|
|
404
|
+
input_type=InputType.INPUT_REGISTER,
|
|
405
|
+
data_type=DataType.FLOAT32,
|
|
406
|
+
platform=Platform.SENSOR,
|
|
407
|
+
unit="°C",
|
|
408
|
+
),
|
|
409
|
+
# Aliases for QubeState compatibility (same addresses as core sensors)
|
|
410
|
+
EntityDef(
|
|
411
|
+
key="flow_rate",
|
|
412
|
+
name="Flow rate",
|
|
413
|
+
address=18,
|
|
414
|
+
input_type=InputType.INPUT_REGISTER,
|
|
415
|
+
data_type=DataType.FLOAT32,
|
|
416
|
+
platform=Platform.SENSOR,
|
|
417
|
+
unit="L/min",
|
|
418
|
+
),
|
|
419
|
+
EntityDef(
|
|
420
|
+
key="setpoint_room_heat_day",
|
|
421
|
+
name="Room setpoint heating (day)",
|
|
422
|
+
address=27,
|
|
423
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
424
|
+
data_type=DataType.FLOAT32,
|
|
425
|
+
platform=Platform.SENSOR,
|
|
426
|
+
unit="°C",
|
|
427
|
+
),
|
|
428
|
+
EntityDef(
|
|
429
|
+
key="setpoint_room_heat_night",
|
|
430
|
+
name="Room setpoint heating (night)",
|
|
431
|
+
address=29,
|
|
432
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
433
|
+
data_type=DataType.FLOAT32,
|
|
434
|
+
platform=Platform.SENSOR,
|
|
435
|
+
unit="°C",
|
|
436
|
+
),
|
|
437
|
+
EntityDef(
|
|
438
|
+
key="setpoint_room_cool_day",
|
|
439
|
+
name="Room setpoint cooling (day)",
|
|
440
|
+
address=31,
|
|
441
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
442
|
+
data_type=DataType.FLOAT32,
|
|
443
|
+
platform=Platform.SENSOR,
|
|
444
|
+
unit="°C",
|
|
445
|
+
),
|
|
446
|
+
EntityDef(
|
|
447
|
+
key="setpoint_room_cool_night",
|
|
448
|
+
name="Room setpoint cooling (night)",
|
|
449
|
+
address=33,
|
|
450
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
451
|
+
data_type=DataType.FLOAT32,
|
|
452
|
+
platform=Platform.SENSOR,
|
|
453
|
+
unit="°C",
|
|
454
|
+
),
|
|
455
|
+
EntityDef(
|
|
456
|
+
key="setpoint_dhw",
|
|
457
|
+
name="User-defined DHW setpoint",
|
|
458
|
+
address=173,
|
|
459
|
+
input_type=InputType.HOLDING_REGISTER,
|
|
460
|
+
data_type=DataType.FLOAT32,
|
|
461
|
+
platform=Platform.SENSOR,
|
|
462
|
+
unit="°C",
|
|
463
|
+
writable=True,
|
|
464
|
+
),
|
|
465
|
+
)
|
|
466
|
+
|
|
467
|
+
# Export as dict for easy lookup by key
|
|
468
|
+
SENSORS: dict[str, EntityDef] = {e.key: e for e in _SENSOR_DEFS}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"""Switch entity definitions for Qube Heat Pump."""
|
|
2
|
+
|
|
3
|
+
from .base import EntityDef, InputType, Platform
|
|
4
|
+
|
|
5
|
+
_SWITCH_DEFS: tuple[EntityDef, ...] = (
|
|
6
|
+
EntityDef(
|
|
7
|
+
key="bms_summerwinter",
|
|
8
|
+
name="Enable summer mode (cooling)",
|
|
9
|
+
address=22,
|
|
10
|
+
input_type=InputType.COIL,
|
|
11
|
+
platform=Platform.SWITCH,
|
|
12
|
+
writable=True,
|
|
13
|
+
),
|
|
14
|
+
EntityDef(
|
|
15
|
+
key="tapw_timeprogram_bms_forced",
|
|
16
|
+
name="Start DHW heating",
|
|
17
|
+
address=23,
|
|
18
|
+
input_type=InputType.COIL,
|
|
19
|
+
platform=Platform.SWITCH,
|
|
20
|
+
writable=True,
|
|
21
|
+
),
|
|
22
|
+
EntityDef(
|
|
23
|
+
key="antilegionella_frcstart_ant",
|
|
24
|
+
name="Start anti-legionella",
|
|
25
|
+
address=45,
|
|
26
|
+
input_type=InputType.COIL,
|
|
27
|
+
platform=Platform.SWITCH,
|
|
28
|
+
writable=True,
|
|
29
|
+
),
|
|
30
|
+
EntityDef(
|
|
31
|
+
key="en_plantsetp_compens",
|
|
32
|
+
name="Enable heating curve",
|
|
33
|
+
address=62,
|
|
34
|
+
input_type=InputType.COIL,
|
|
35
|
+
platform=Platform.SWITCH,
|
|
36
|
+
writable=True,
|
|
37
|
+
),
|
|
38
|
+
EntityDef(
|
|
39
|
+
key="bms_sgready_a",
|
|
40
|
+
name="SG Ready A",
|
|
41
|
+
address=65,
|
|
42
|
+
input_type=InputType.COIL,
|
|
43
|
+
platform=Platform.SWITCH,
|
|
44
|
+
writable=True,
|
|
45
|
+
),
|
|
46
|
+
EntityDef(
|
|
47
|
+
key="bms_sgready_b",
|
|
48
|
+
name="SG Ready B",
|
|
49
|
+
address=66,
|
|
50
|
+
input_type=InputType.COIL,
|
|
51
|
+
platform=Platform.SWITCH,
|
|
52
|
+
writable=True,
|
|
53
|
+
),
|
|
54
|
+
EntityDef(
|
|
55
|
+
key="modbus_demand",
|
|
56
|
+
name="Activate heat demand",
|
|
57
|
+
address=67,
|
|
58
|
+
input_type=InputType.COIL,
|
|
59
|
+
platform=Platform.SWITCH,
|
|
60
|
+
writable=True,
|
|
61
|
+
),
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
# Export as dict for easy lookup by key
|
|
65
|
+
SWITCHES: dict[str, EntityDef] = {e.key: e for e in _SWITCH_DEFS}
|
python_qube_heatpump/models.py
CHANGED
|
@@ -1,37 +1,55 @@
|
|
|
1
1
|
"""Models for Qube Heat Pump."""
|
|
2
2
|
|
|
3
|
-
from dataclasses import dataclass
|
|
4
|
-
from typing import
|
|
3
|
+
from dataclasses import dataclass, field
|
|
4
|
+
from typing import Any
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
@dataclass
|
|
8
8
|
class QubeState:
|
|
9
|
-
"""Representation of the Qube Heat Pump state.
|
|
9
|
+
"""Representation of the Qube Heat Pump state.
|
|
10
|
+
|
|
11
|
+
Typed fields for core sensors (used by official HA integration).
|
|
12
|
+
Extended dict for additional entities (used by HACS integration).
|
|
13
|
+
"""
|
|
10
14
|
|
|
11
15
|
# Temperatures
|
|
12
|
-
temp_supply:
|
|
13
|
-
temp_return:
|
|
14
|
-
temp_source_in:
|
|
15
|
-
temp_source_out:
|
|
16
|
-
temp_room:
|
|
17
|
-
temp_dhw:
|
|
18
|
-
temp_outside:
|
|
16
|
+
temp_supply: float | None = None
|
|
17
|
+
temp_return: float | None = None
|
|
18
|
+
temp_source_in: float | None = None
|
|
19
|
+
temp_source_out: float | None = None
|
|
20
|
+
temp_room: float | None = None
|
|
21
|
+
temp_dhw: float | None = None
|
|
22
|
+
temp_outside: float | None = None
|
|
19
23
|
|
|
20
24
|
# Power/Energy
|
|
21
|
-
power_thermic:
|
|
22
|
-
power_electric:
|
|
23
|
-
energy_total_electric:
|
|
24
|
-
energy_total_thermic:
|
|
25
|
-
cop_calc:
|
|
25
|
+
power_thermic: float | None = None
|
|
26
|
+
power_electric: float | None = None
|
|
27
|
+
energy_total_electric: float | None = None
|
|
28
|
+
energy_total_thermic: float | None = None
|
|
29
|
+
cop_calc: float | None = None
|
|
26
30
|
|
|
27
31
|
# Operation
|
|
28
|
-
status_code:
|
|
29
|
-
compressor_speed:
|
|
30
|
-
flow_rate:
|
|
32
|
+
status_code: int | None = None
|
|
33
|
+
compressor_speed: float | None = None
|
|
34
|
+
flow_rate: float | None = None
|
|
31
35
|
|
|
32
36
|
# Setpoints (Read/Write)
|
|
33
|
-
setpoint_room_heat_day:
|
|
34
|
-
setpoint_room_heat_night:
|
|
35
|
-
setpoint_room_cool_day:
|
|
36
|
-
setpoint_room_cool_night:
|
|
37
|
-
setpoint_dhw:
|
|
37
|
+
setpoint_room_heat_day: float | None = None
|
|
38
|
+
setpoint_room_heat_night: float | None = None
|
|
39
|
+
setpoint_room_cool_day: float | None = None
|
|
40
|
+
setpoint_room_cool_night: float | None = None
|
|
41
|
+
setpoint_dhw: float | None = None
|
|
42
|
+
|
|
43
|
+
# Extended dict for additional entities not covered by typed fields
|
|
44
|
+
_extended: dict[str, Any] = field(default_factory=dict)
|
|
45
|
+
|
|
46
|
+
def get(self, key: str, default: Any = None) -> Any:
|
|
47
|
+
"""Get a value by key, checking typed fields first, then _extended."""
|
|
48
|
+
if hasattr(self, key) and key != "_extended":
|
|
49
|
+
value = getattr(self, key)
|
|
50
|
+
return value if value is not None else default
|
|
51
|
+
return self._extended.get(key, default)
|
|
52
|
+
|
|
53
|
+
def set_extended(self, key: str, value: Any) -> None:
|
|
54
|
+
"""Set a value in the extended dict."""
|
|
55
|
+
self._extended[key] = value
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-qube-heatpump
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.1
|
|
4
4
|
Summary: Async Modbus client for Qube Heat Pumps
|
|
5
5
|
Project-URL: Homepage, https://github.com/MattieGit/python-qube-heatpump
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/MattieGit/python-qube-heatpump/issues
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
python_qube_heatpump/__init__.py,sha256=VnHFpnpnRzpxmNPAGM29FQkrcPcBAaIniWjHu68-7WA,669
|
|
2
|
+
python_qube_heatpump/client.py,sha256=97PY4hVkBJy5SvHrX1-ZXKAT0nri1PuUA5yu4ZNLqTk,15198
|
|
3
|
+
python_qube_heatpump/const.py,sha256=oAwKCIpmXPh5dRwX1dhdmGTJZKMlTVDnspUqAgYGZk0,4651
|
|
4
|
+
python_qube_heatpump/models.py,sha256=vbJdY93JkQ6ea30qhGjuCknUxRJqTiz0mTjPsb2r4xk,1841
|
|
5
|
+
python_qube_heatpump/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
python_qube_heatpump/entities/__init__.py,sha256=rGEqLY-KcsIlmEaM7LbriDMEqedn7NLA4sgKDI6sYM8,342
|
|
7
|
+
python_qube_heatpump/entities/base.py,sha256=5itTSm6cxklHsPr1qz3UWmr1kYBeCVOAugk182ybf3s,1867
|
|
8
|
+
python_qube_heatpump/entities/binary_sensors.py,sha256=lsYC0MEHjJ7JmJUgYzdHndkrZ1Ekxz4j9HqYDMEE_IA,7649
|
|
9
|
+
python_qube_heatpump/entities/sensors.py,sha256=Lros4QS1xzapR26n40GeAUDyiBipKGPuHyWDUbzgIiw,13176
|
|
10
|
+
python_qube_heatpump/entities/switches.py,sha256=MAaK-63dgVZEm9Ch_CW7umYM_mPqMoPYl8i0ZpZIaYE,1676
|
|
11
|
+
python_qube_heatpump-1.3.1.dist-info/METADATA,sha256=cuTI7qhuNkDnVkavyuIAhaXKY6aTStkVe0JBFdcP54M,950
|
|
12
|
+
python_qube_heatpump-1.3.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
13
|
+
python_qube_heatpump-1.3.1.dist-info/licenses/LICENSE,sha256=qpuQXN7QwpILG9GYcmqrd3Ax5CxBZUBoT295xTgKnOM,1062
|
|
14
|
+
python_qube_heatpump-1.3.1.dist-info/RECORD,,
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
python_qube_heatpump/__init__.py,sha256=eW8_tyAweg7YTOI599pi8gf3mt7aXW0SCw5ZyrBVJpU,57
|
|
2
|
-
python_qube_heatpump/client.py,sha256=BgCJbQBV57cfsWMfakjbs2VXgrQ8BZH8KnX1pnTke7k,6083
|
|
3
|
-
python_qube_heatpump/const.py,sha256=sXvXRcDb1uvBgzH2lV67Me_XtUErKA3fXMLO9gEGrlQ,3680
|
|
4
|
-
python_qube_heatpump/models.py,sha256=3I5U9_rEe1r73hwY4sNAMXfIxyPjBOtx06c_mAURLDk,1141
|
|
5
|
-
python_qube_heatpump-1.2.3.dist-info/METADATA,sha256=P-_IjdAl1jsiU4xYN_6oqlYK6gPvN8mvxM3qwU5tGmY,950
|
|
6
|
-
python_qube_heatpump-1.2.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
7
|
-
python_qube_heatpump-1.2.3.dist-info/licenses/LICENSE,sha256=qpuQXN7QwpILG9GYcmqrd3Ax5CxBZUBoT295xTgKnOM,1062
|
|
8
|
-
python_qube_heatpump-1.2.3.dist-info/RECORD,,
|
|
File without changes
|
{python_qube_heatpump-1.2.3.dist-info → python_qube_heatpump-1.3.1.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|