weheat 2024.7.8__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.

Potentially problematic release.


This version of weheat might be problematic. Click here for more details.

@@ -0,0 +1,41 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Weheat Backend
5
+
6
+ This is the backend for the Weheat project
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import json
16
+ import pprint
17
+ import re # noqa: F401
18
+ from aenum import Enum, no_arg
19
+
20
+
21
+
22
+
23
+
24
+ class HeatPumpModel(int, Enum):
25
+ """
26
+ Model of the heat pump - BlackBirdP80: BlackBird P80 heat pump (0) - BlackBirdP60: BlackBird P60 heat pump (1) - SparrowP60: Sparrow P60 heat pump (2)
27
+ """
28
+
29
+ """
30
+ allowed enum values
31
+ """
32
+ NUMBER_0 = 0
33
+ NUMBER_1 = 1
34
+ NUMBER_2 = 2
35
+
36
+ @classmethod
37
+ def from_json(cls, json_str: str) -> HeatPumpModel:
38
+ """Create an instance of HeatPumpModel from a JSON string"""
39
+ return HeatPumpModel(json.loads(json_str))
40
+
41
+
@@ -0,0 +1,46 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Weheat Backend
5
+
6
+ This is the backend for the Weheat project
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import json
16
+ import pprint
17
+ import re # noqa: F401
18
+ from aenum import Enum, no_arg
19
+
20
+
21
+
22
+
23
+
24
+ class HeatPumpStatusEnum(int, Enum):
25
+ """
26
+ Last status of the heat pump from the last heat pump log - Standby (40) - Heating (70) - Defrost (90) - Cooling (130) - DHW (150) - Lionelle (160) - SelfTest (170) - ManualControl (180)
27
+ """
28
+
29
+ """
30
+ allowed enum values
31
+ """
32
+ NUMBER_40 = 40
33
+ NUMBER_70 = 70
34
+ NUMBER_90 = 90
35
+ NUMBER_130 = 130
36
+ NUMBER_150 = 150
37
+ NUMBER_160 = 160
38
+ NUMBER_170 = 170
39
+ NUMBER_180 = 180
40
+
41
+ @classmethod
42
+ def from_json(cls, json_str: str) -> HeatPumpStatusEnum:
43
+ """Create an instance of HeatPumpStatusEnum from a JSON string"""
44
+ return HeatPumpStatusEnum(json.loads(json_str))
45
+
46
+
@@ -0,0 +1,42 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Weheat Backend
5
+
6
+ This is the backend for the Weheat project
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ import json
16
+ import pprint
17
+ import re # noqa: F401
18
+ from aenum import Enum, no_arg
19
+
20
+
21
+
22
+
23
+
24
+ class HeatPumpType(int, Enum):
25
+ """
26
+ LEGACY TYPE, Obsolete please do not use HeatPumpType, new properties split up into HeatPumpModel, DhwType and BoilerType
27
+ """
28
+
29
+ """
30
+ allowed enum values
31
+ """
32
+ NUMBER_0 = 0
33
+ NUMBER_1 = 1
34
+ NUMBER_2 = 2
35
+ NUMBER_3 = 3
36
+
37
+ @classmethod
38
+ def from_json(cls, json_str: str) -> HeatPumpType:
39
+ """Create an instance of HeatPumpType from a JSON string"""
40
+ return HeatPumpType(json.loads(json_str))
41
+
42
+
@@ -0,0 +1,513 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Weheat Backend
5
+
6
+ This is the backend for the Weheat project
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from typing import Optional, Union
22
+ from pydantic import BaseModel, Field, StrictBool, StrictFloat, StrictInt, StrictStr
23
+
24
+ class RawHeatPumpLogDto(BaseModel):
25
+ """
26
+ Raw heat pump log as given by a heat pump (Required star states that it will always be there for any roll, otherwise it is filtered for customers) # noqa: E501
27
+ """
28
+ heat_pump_id: StrictStr = Field(..., alias="heatPumpId", description="Identifier of the Heat Pump")
29
+ timestamp: datetime = Field(..., description="Timestamp of when this was logged to the server")
30
+ firmware_revision: Optional[StrictInt] = Field(None, alias="firmwareRevision", description="Version of heat pump logs (should be 1026)")
31
+ packet_counter: Optional[StrictInt] = Field(None, alias="packetCounter", description="Packet counter of inside the control board")
32
+ unix_time_mcu: Optional[StrictInt] = Field(None, alias="unixTimeMcu", description="Unix time inside the control board at the time it send this log")
33
+ state: Optional[StrictInt] = Field(None, description="Current heat pump state (which is decoded in the view)")
34
+ rpm_ctrl: Optional[StrictInt] = Field(None, alias="rpmCtrl", description="Current mode of RPM control (which is decoded in the view)")
35
+ error: Optional[StrictInt] = Field(None, description="Current state of error in the heat pump (which is decoded in the view)")
36
+ error_decoded_dtc_none: Optional[StrictBool] = Field(None, alias="errorDecodedDtcNone", description="None state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
37
+ error_decoded_dtc_continue: Optional[StrictBool] = Field(None, alias="errorDecodedDtcContinue", description="DTC continue state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
38
+ error_decoded_dtc_compressor_off: Optional[StrictBool] = Field(None, alias="errorDecodedDtcCompressorOff", description="DTC off state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
39
+ error_decoded_dtc_defrost_forbidden: Optional[StrictBool] = Field(None, alias="errorDecodedDtcDefrostForbidden", description="DTC defrost forbidden state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
40
+ error_decoded_dtc_request_service: Optional[StrictBool] = Field(None, alias="errorDecodedDtcRequestService", description="DTC request service state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
41
+ error_decoded_dtc_use_heating_curve: Optional[StrictBool] = Field(None, alias="errorDecodedDtcUseHeatingCurve", description="DTC use heating curve state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
42
+ error_decoded_dtc_dhw_forbidden: Optional[StrictBool] = Field(None, alias="errorDecodedDtcDhwForbidden", description="DTC use heating curve state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
43
+ error_decoded_dtc_error: Optional[StrictBool] = Field(None, alias="errorDecodedDtcError", description="DTC use heating curve state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
44
+ error_decoded_dtc_inactive: Optional[StrictBool] = Field(None, alias="errorDecodedDtcInactive", description="DTC Inactive state of the error flag which isn't raw for practical timescale purposes (it was bitwise encoded)")
45
+ heatsink: Optional[StrictInt] = Field(None, description="Raw state of the where the heat pump is dumping it's heat")
46
+ si5: Optional[StrictInt] = Field(None, description="Raw state of the heat pump")
47
+ e80: Optional[StrictInt] = Field(None, description="Raw error code state 80 of the heat pump")
48
+ e81: Optional[StrictInt] = Field(None, description="Raw error code state 81 of the heat pump")
49
+ e84: Optional[StrictInt] = Field(None, description="Raw error code state 84 of the heat pump")
50
+ e85: Optional[StrictInt] = Field(None, description="Raw error code state 85 of the heat pump")
51
+ control_bridge_status: Optional[StrictInt] = Field(None, alias="controlBridgeStatus", description="Raw control bridge status of the heat pump (bitwise encoded)")
52
+ control_bridge_status_decoded_water_pump: Optional[StrictBool] = Field(None, alias="controlBridgeStatusDecodedWaterPump", description="Water pump (requested) on/off flag of the control bridge status (0x01)")
53
+ control_bridge_status_decoded_dhw_valve: Optional[StrictBool] = Field(None, alias="controlBridgeStatusDecodedDhwValve", description="DhwValve (requested) open/closed flag of the control bridge status (0x02) (DHW Only)")
54
+ control_bridge_status_decoded_gas_boiler: Optional[StrictBool] = Field(None, alias="controlBridgeStatusDecodedGasBoiler", description="Gas boiler assistance (requested) on/off flag of the control bridge status (0x04) (Hybrid Only)")
55
+ control_bridge_status_decoded_electric_heater: Optional[StrictBool] = Field(None, alias="controlBridgeStatusDecodedElectricHeater", description="Electric heater assistance (requested) on/off flag of the control bridge status (0x08) (DHW Only)")
56
+ control_bridge_status_decoded_water_pump2: Optional[StrictBool] = Field(None, alias="controlBridgeStatusDecodedWaterPump2", description="Second water pump (requested) on/off flag of the control bridge status (0x010) (DHW Only)")
57
+ input_status: Optional[StrictInt] = Field(None, alias="inputStatus", description="Raw input status of the heat pump")
58
+ current_control_method: Optional[StrictInt] = Field(None, alias="currentControlMethod", description="Raw current control method state of the heat pump")
59
+ signal_strength: Optional[StrictInt] = Field(None, alias="signalStrength", description="Signal strength (rssi) reported by the modem of the control board")
60
+ t1: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Temperature T1 (TOP) of the DHW sensors")
61
+ t2: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Temperature T2 (BOTTOM) of the DHW sensors")
62
+ t_spare_ntc: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tSpareNtc", description="Spare temperature sensor (for DHW)")
63
+ t_board: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tBoard", description="Temperature of the control board")
64
+ t_air_in: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tAirIn", description="Temperature of the air going into the heat pump")
65
+ t_air_out: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tAirOut", description="Temperature of the air going out of the heat pump")
66
+ t_water_in: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tWaterIn", description="Temperature of the water going into the heat pump")
67
+ t_water_out: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tWaterOut", description="Temperature of the water going out of the heat pump")
68
+ t_water_house_in: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tWaterHouseIn", description="Temperature of the water going into the building")
69
+ rpm: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Rpm of the compressor")
70
+ rpm_limiter: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="rpmLimiter", description="Rpm limit of the compressor")
71
+ rpm_limiter_type: Optional[StrictInt] = Field(None, alias="rpmLimiterType", description="Type of why the rpm is limited")
72
+ p_compressor_in: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="pCompressorIn", description="Pressure of the compressor of the side where air goes into the compressor")
73
+ p_compressor_out: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="pCompressorOut", description="Pressure of the compressor of the side where air goes out of the compressor")
74
+ p_compressor_in_target: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="pCompressorInTarget", description="Target pressure of the compressor of the side where air goes into the compressor")
75
+ t_inverter: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tInverter", description="Temperature of the inverter")
76
+ t_compressor_in: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tCompressorIn", description="Temperature of the compressor of the side where air goes into the compressor")
77
+ t_compressor_out: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tCompressorOut", description="Temperature of the compressor of the side where air goes out of the compressor")
78
+ t_compressor_in_transient: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tCompressorInTransient", description="Temperature transient of the compressor of the side where air goes into the compressor")
79
+ t_compressor_out_transient: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tCompressorOutTransient", description="Temperature transient of the compressor of the side where air goes out of the compressor")
80
+ delta_t_compressor_in_superheat: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="deltaTCompressorInSuperheat", description="Difference in temperature for superheat based on the compressor temperatures")
81
+ compressor_power_low_accuracy: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="compressorPowerLowAccuracy", description="Power used by the compressor (low accuracy)")
82
+ fan: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="State of the fan")
83
+ fan_power: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="fanPower", description="Power used by the fan")
84
+ valve: Optional[Union[StrictFloat, StrictInt]] = Field(None, description="Position value of the valve")
85
+ exv_flow_step_gain: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="exvFlowStepGain")
86
+ cm_mass_flow: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cmMassFlow", description="Flow of the water going through the heat pump")
87
+ cm_mass_power_in: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cmMassPowerIn", description="Power going into the heat pump")
88
+ cm_mass_power_out: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="cmMassPowerOut", description="Power going out of the heat pump (in the form of usable heat)")
89
+ p_requested: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="pRequested", description="Power requested by the heat pump")
90
+ power_error_integral: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="powerErrorIntegral", description="Current value of the power error integral")
91
+ on_off_thermostat_state: Optional[StrictInt] = Field(None, alias="onOffThermostatState", description="State of the on/off thermostat")
92
+ thermostat_status: Optional[StrictInt] = Field(None, alias="thermostatStatus", description="Status of the OpenTherm thermostat")
93
+ t_room: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tRoom", description="Temperature of the room given by the OpenTherm thermostat")
94
+ t_room_target: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tRoomTarget", description="Target temperature of the room given by the OpenTherm thermostat")
95
+ t_thermostat_setpoint: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="tThermostatSetpoint", description="Setpoint temperature of the OpenTherm thermostat OR the water setpoint of the heat pump")
96
+ ot_boiler_status: Optional[StrictInt] = Field(None, alias="otBoilerStatus", description="Status of the OpenTherm boiler")
97
+ ot_boiler_feed_temperature: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="otBoilerFeedTemperature", description="Feed temperature of the OpenTherm boiler")
98
+ ot_boiler_return_temperature: Optional[Union[StrictFloat, StrictInt]] = Field(None, alias="otBoilerReturnTemperature", description="Return temperature of the OpenTherm boiler")
99
+ interval: StrictInt = Field(..., description="Interval for this log in seconds")
100
+ __properties = ["heatPumpId", "timestamp", "firmwareRevision", "packetCounter", "unixTimeMcu", "state", "rpmCtrl", "error", "errorDecodedDtcNone", "errorDecodedDtcContinue", "errorDecodedDtcCompressorOff", "errorDecodedDtcDefrostForbidden", "errorDecodedDtcRequestService", "errorDecodedDtcUseHeatingCurve", "errorDecodedDtcDhwForbidden", "errorDecodedDtcError", "errorDecodedDtcInactive", "heatsink", "si5", "e80", "e81", "e84", "e85", "controlBridgeStatus", "controlBridgeStatusDecodedWaterPump", "controlBridgeStatusDecodedDhwValve", "controlBridgeStatusDecodedGasBoiler", "controlBridgeStatusDecodedElectricHeater", "controlBridgeStatusDecodedWaterPump2", "inputStatus", "currentControlMethod", "signalStrength", "t1", "t2", "tSpareNtc", "tBoard", "tAirIn", "tAirOut", "tWaterIn", "tWaterOut", "tWaterHouseIn", "rpm", "rpmLimiter", "rpmLimiterType", "pCompressorIn", "pCompressorOut", "pCompressorInTarget", "tInverter", "tCompressorIn", "tCompressorOut", "tCompressorInTransient", "tCompressorOutTransient", "deltaTCompressorInSuperheat", "compressorPowerLowAccuracy", "fan", "fanPower", "valve", "exvFlowStepGain", "cmMassFlow", "cmMassPowerIn", "cmMassPowerOut", "pRequested", "powerErrorIntegral", "onOffThermostatState", "thermostatStatus", "tRoom", "tRoomTarget", "tThermostatSetpoint", "otBoilerStatus", "otBoilerFeedTemperature", "otBoilerReturnTemperature", "interval"]
101
+
102
+ class Config:
103
+ """Pydantic configuration"""
104
+ allow_population_by_field_name = True
105
+ validate_assignment = True
106
+
107
+ def to_str(self) -> str:
108
+ """Returns the string representation of the model using alias"""
109
+ return pprint.pformat(self.dict(by_alias=True))
110
+
111
+ def to_json(self) -> str:
112
+ """Returns the JSON representation of the model using alias"""
113
+ return json.dumps(self.to_dict())
114
+
115
+ @classmethod
116
+ def from_json(cls, json_str: str) -> RawHeatPumpLogDto:
117
+ """Create an instance of RawHeatPumpLogDto from a JSON string"""
118
+ return cls.from_dict(json.loads(json_str))
119
+
120
+ def to_dict(self):
121
+ """Returns the dictionary representation of the model using alias"""
122
+ _dict = self.dict(by_alias=True,
123
+ exclude={
124
+ },
125
+ exclude_none=True)
126
+ # set to None if firmware_revision (nullable) is None
127
+ # and __fields_set__ contains the field
128
+ if self.firmware_revision is None and "firmware_revision" in self.__fields_set__:
129
+ _dict['firmwareRevision'] = None
130
+
131
+ # set to None if packet_counter (nullable) is None
132
+ # and __fields_set__ contains the field
133
+ if self.packet_counter is None and "packet_counter" in self.__fields_set__:
134
+ _dict['packetCounter'] = None
135
+
136
+ # set to None if unix_time_mcu (nullable) is None
137
+ # and __fields_set__ contains the field
138
+ if self.unix_time_mcu is None and "unix_time_mcu" in self.__fields_set__:
139
+ _dict['unixTimeMcu'] = None
140
+
141
+ # set to None if error (nullable) is None
142
+ # and __fields_set__ contains the field
143
+ if self.error is None and "error" in self.__fields_set__:
144
+ _dict['error'] = None
145
+
146
+ # set to None if error_decoded_dtc_none (nullable) is None
147
+ # and __fields_set__ contains the field
148
+ if self.error_decoded_dtc_none is None and "error_decoded_dtc_none" in self.__fields_set__:
149
+ _dict['errorDecodedDtcNone'] = None
150
+
151
+ # set to None if error_decoded_dtc_continue (nullable) is None
152
+ # and __fields_set__ contains the field
153
+ if self.error_decoded_dtc_continue is None and "error_decoded_dtc_continue" in self.__fields_set__:
154
+ _dict['errorDecodedDtcContinue'] = None
155
+
156
+ # set to None if error_decoded_dtc_compressor_off (nullable) is None
157
+ # and __fields_set__ contains the field
158
+ if self.error_decoded_dtc_compressor_off is None and "error_decoded_dtc_compressor_off" in self.__fields_set__:
159
+ _dict['errorDecodedDtcCompressorOff'] = None
160
+
161
+ # set to None if error_decoded_dtc_defrost_forbidden (nullable) is None
162
+ # and __fields_set__ contains the field
163
+ if self.error_decoded_dtc_defrost_forbidden is None and "error_decoded_dtc_defrost_forbidden" in self.__fields_set__:
164
+ _dict['errorDecodedDtcDefrostForbidden'] = None
165
+
166
+ # set to None if error_decoded_dtc_request_service (nullable) is None
167
+ # and __fields_set__ contains the field
168
+ if self.error_decoded_dtc_request_service is None and "error_decoded_dtc_request_service" in self.__fields_set__:
169
+ _dict['errorDecodedDtcRequestService'] = None
170
+
171
+ # set to None if error_decoded_dtc_use_heating_curve (nullable) is None
172
+ # and __fields_set__ contains the field
173
+ if self.error_decoded_dtc_use_heating_curve is None and "error_decoded_dtc_use_heating_curve" in self.__fields_set__:
174
+ _dict['errorDecodedDtcUseHeatingCurve'] = None
175
+
176
+ # set to None if error_decoded_dtc_dhw_forbidden (nullable) is None
177
+ # and __fields_set__ contains the field
178
+ if self.error_decoded_dtc_dhw_forbidden is None and "error_decoded_dtc_dhw_forbidden" in self.__fields_set__:
179
+ _dict['errorDecodedDtcDhwForbidden'] = None
180
+
181
+ # set to None if error_decoded_dtc_error (nullable) is None
182
+ # and __fields_set__ contains the field
183
+ if self.error_decoded_dtc_error is None and "error_decoded_dtc_error" in self.__fields_set__:
184
+ _dict['errorDecodedDtcError'] = None
185
+
186
+ # set to None if error_decoded_dtc_inactive (nullable) is None
187
+ # and __fields_set__ contains the field
188
+ if self.error_decoded_dtc_inactive is None and "error_decoded_dtc_inactive" in self.__fields_set__:
189
+ _dict['errorDecodedDtcInactive'] = None
190
+
191
+ # set to None if heatsink (nullable) is None
192
+ # and __fields_set__ contains the field
193
+ if self.heatsink is None and "heatsink" in self.__fields_set__:
194
+ _dict['heatsink'] = None
195
+
196
+ # set to None if si5 (nullable) is None
197
+ # and __fields_set__ contains the field
198
+ if self.si5 is None and "si5" in self.__fields_set__:
199
+ _dict['si5'] = None
200
+
201
+ # set to None if e80 (nullable) is None
202
+ # and __fields_set__ contains the field
203
+ if self.e80 is None and "e80" in self.__fields_set__:
204
+ _dict['e80'] = None
205
+
206
+ # set to None if e81 (nullable) is None
207
+ # and __fields_set__ contains the field
208
+ if self.e81 is None and "e81" in self.__fields_set__:
209
+ _dict['e81'] = None
210
+
211
+ # set to None if e84 (nullable) is None
212
+ # and __fields_set__ contains the field
213
+ if self.e84 is None and "e84" in self.__fields_set__:
214
+ _dict['e84'] = None
215
+
216
+ # set to None if e85 (nullable) is None
217
+ # and __fields_set__ contains the field
218
+ if self.e85 is None and "e85" in self.__fields_set__:
219
+ _dict['e85'] = None
220
+
221
+ # set to None if control_bridge_status (nullable) is None
222
+ # and __fields_set__ contains the field
223
+ if self.control_bridge_status is None and "control_bridge_status" in self.__fields_set__:
224
+ _dict['controlBridgeStatus'] = None
225
+
226
+ # set to None if control_bridge_status_decoded_water_pump (nullable) is None
227
+ # and __fields_set__ contains the field
228
+ if self.control_bridge_status_decoded_water_pump is None and "control_bridge_status_decoded_water_pump" in self.__fields_set__:
229
+ _dict['controlBridgeStatusDecodedWaterPump'] = None
230
+
231
+ # set to None if control_bridge_status_decoded_dhw_valve (nullable) is None
232
+ # and __fields_set__ contains the field
233
+ if self.control_bridge_status_decoded_dhw_valve is None and "control_bridge_status_decoded_dhw_valve" in self.__fields_set__:
234
+ _dict['controlBridgeStatusDecodedDhwValve'] = None
235
+
236
+ # set to None if control_bridge_status_decoded_gas_boiler (nullable) is None
237
+ # and __fields_set__ contains the field
238
+ if self.control_bridge_status_decoded_gas_boiler is None and "control_bridge_status_decoded_gas_boiler" in self.__fields_set__:
239
+ _dict['controlBridgeStatusDecodedGasBoiler'] = None
240
+
241
+ # set to None if control_bridge_status_decoded_electric_heater (nullable) is None
242
+ # and __fields_set__ contains the field
243
+ if self.control_bridge_status_decoded_electric_heater is None and "control_bridge_status_decoded_electric_heater" in self.__fields_set__:
244
+ _dict['controlBridgeStatusDecodedElectricHeater'] = None
245
+
246
+ # set to None if control_bridge_status_decoded_water_pump2 (nullable) is None
247
+ # and __fields_set__ contains the field
248
+ if self.control_bridge_status_decoded_water_pump2 is None and "control_bridge_status_decoded_water_pump2" in self.__fields_set__:
249
+ _dict['controlBridgeStatusDecodedWaterPump2'] = None
250
+
251
+ # set to None if input_status (nullable) is None
252
+ # and __fields_set__ contains the field
253
+ if self.input_status is None and "input_status" in self.__fields_set__:
254
+ _dict['inputStatus'] = None
255
+
256
+ # set to None if current_control_method (nullable) is None
257
+ # and __fields_set__ contains the field
258
+ if self.current_control_method is None and "current_control_method" in self.__fields_set__:
259
+ _dict['currentControlMethod'] = None
260
+
261
+ # set to None if signal_strength (nullable) is None
262
+ # and __fields_set__ contains the field
263
+ if self.signal_strength is None and "signal_strength" in self.__fields_set__:
264
+ _dict['signalStrength'] = None
265
+
266
+ # set to None if t1 (nullable) is None
267
+ # and __fields_set__ contains the field
268
+ if self.t1 is None and "t1" in self.__fields_set__:
269
+ _dict['t1'] = None
270
+
271
+ # set to None if t2 (nullable) is None
272
+ # and __fields_set__ contains the field
273
+ if self.t2 is None and "t2" in self.__fields_set__:
274
+ _dict['t2'] = None
275
+
276
+ # set to None if t_spare_ntc (nullable) is None
277
+ # and __fields_set__ contains the field
278
+ if self.t_spare_ntc is None and "t_spare_ntc" in self.__fields_set__:
279
+ _dict['tSpareNtc'] = None
280
+
281
+ # set to None if t_board (nullable) is None
282
+ # and __fields_set__ contains the field
283
+ if self.t_board is None and "t_board" in self.__fields_set__:
284
+ _dict['tBoard'] = None
285
+
286
+ # set to None if rpm (nullable) is None
287
+ # and __fields_set__ contains the field
288
+ if self.rpm is None and "rpm" in self.__fields_set__:
289
+ _dict['rpm'] = None
290
+
291
+ # set to None if rpm_limiter (nullable) is None
292
+ # and __fields_set__ contains the field
293
+ if self.rpm_limiter is None and "rpm_limiter" in self.__fields_set__:
294
+ _dict['rpmLimiter'] = None
295
+
296
+ # set to None if rpm_limiter_type (nullable) is None
297
+ # and __fields_set__ contains the field
298
+ if self.rpm_limiter_type is None and "rpm_limiter_type" in self.__fields_set__:
299
+ _dict['rpmLimiterType'] = None
300
+
301
+ # set to None if p_compressor_in (nullable) is None
302
+ # and __fields_set__ contains the field
303
+ if self.p_compressor_in is None and "p_compressor_in" in self.__fields_set__:
304
+ _dict['pCompressorIn'] = None
305
+
306
+ # set to None if p_compressor_out (nullable) is None
307
+ # and __fields_set__ contains the field
308
+ if self.p_compressor_out is None and "p_compressor_out" in self.__fields_set__:
309
+ _dict['pCompressorOut'] = None
310
+
311
+ # set to None if p_compressor_in_target (nullable) is None
312
+ # and __fields_set__ contains the field
313
+ if self.p_compressor_in_target is None and "p_compressor_in_target" in self.__fields_set__:
314
+ _dict['pCompressorInTarget'] = None
315
+
316
+ # set to None if t_inverter (nullable) is None
317
+ # and __fields_set__ contains the field
318
+ if self.t_inverter is None and "t_inverter" in self.__fields_set__:
319
+ _dict['tInverter'] = None
320
+
321
+ # set to None if t_compressor_in (nullable) is None
322
+ # and __fields_set__ contains the field
323
+ if self.t_compressor_in is None and "t_compressor_in" in self.__fields_set__:
324
+ _dict['tCompressorIn'] = None
325
+
326
+ # set to None if t_compressor_out (nullable) is None
327
+ # and __fields_set__ contains the field
328
+ if self.t_compressor_out is None and "t_compressor_out" in self.__fields_set__:
329
+ _dict['tCompressorOut'] = None
330
+
331
+ # set to None if t_compressor_in_transient (nullable) is None
332
+ # and __fields_set__ contains the field
333
+ if self.t_compressor_in_transient is None and "t_compressor_in_transient" in self.__fields_set__:
334
+ _dict['tCompressorInTransient'] = None
335
+
336
+ # set to None if t_compressor_out_transient (nullable) is None
337
+ # and __fields_set__ contains the field
338
+ if self.t_compressor_out_transient is None and "t_compressor_out_transient" in self.__fields_set__:
339
+ _dict['tCompressorOutTransient'] = None
340
+
341
+ # set to None if delta_t_compressor_in_superheat (nullable) is None
342
+ # and __fields_set__ contains the field
343
+ if self.delta_t_compressor_in_superheat is None and "delta_t_compressor_in_superheat" in self.__fields_set__:
344
+ _dict['deltaTCompressorInSuperheat'] = None
345
+
346
+ # set to None if compressor_power_low_accuracy (nullable) is None
347
+ # and __fields_set__ contains the field
348
+ if self.compressor_power_low_accuracy is None and "compressor_power_low_accuracy" in self.__fields_set__:
349
+ _dict['compressorPowerLowAccuracy'] = None
350
+
351
+ # set to None if fan (nullable) is None
352
+ # and __fields_set__ contains the field
353
+ if self.fan is None and "fan" in self.__fields_set__:
354
+ _dict['fan'] = None
355
+
356
+ # set to None if fan_power (nullable) is None
357
+ # and __fields_set__ contains the field
358
+ if self.fan_power is None and "fan_power" in self.__fields_set__:
359
+ _dict['fanPower'] = None
360
+
361
+ # set to None if valve (nullable) is None
362
+ # and __fields_set__ contains the field
363
+ if self.valve is None and "valve" in self.__fields_set__:
364
+ _dict['valve'] = None
365
+
366
+ # set to None if exv_flow_step_gain (nullable) is None
367
+ # and __fields_set__ contains the field
368
+ if self.exv_flow_step_gain is None and "exv_flow_step_gain" in self.__fields_set__:
369
+ _dict['exvFlowStepGain'] = None
370
+
371
+ # set to None if cm_mass_flow (nullable) is None
372
+ # and __fields_set__ contains the field
373
+ if self.cm_mass_flow is None and "cm_mass_flow" in self.__fields_set__:
374
+ _dict['cmMassFlow'] = None
375
+
376
+ # set to None if cm_mass_power_in (nullable) is None
377
+ # and __fields_set__ contains the field
378
+ if self.cm_mass_power_in is None and "cm_mass_power_in" in self.__fields_set__:
379
+ _dict['cmMassPowerIn'] = None
380
+
381
+ # set to None if cm_mass_power_out (nullable) is None
382
+ # and __fields_set__ contains the field
383
+ if self.cm_mass_power_out is None and "cm_mass_power_out" in self.__fields_set__:
384
+ _dict['cmMassPowerOut'] = None
385
+
386
+ # set to None if p_requested (nullable) is None
387
+ # and __fields_set__ contains the field
388
+ if self.p_requested is None and "p_requested" in self.__fields_set__:
389
+ _dict['pRequested'] = None
390
+
391
+ # set to None if power_error_integral (nullable) is None
392
+ # and __fields_set__ contains the field
393
+ if self.power_error_integral is None and "power_error_integral" in self.__fields_set__:
394
+ _dict['powerErrorIntegral'] = None
395
+
396
+ # set to None if thermostat_status (nullable) is None
397
+ # and __fields_set__ contains the field
398
+ if self.thermostat_status is None and "thermostat_status" in self.__fields_set__:
399
+ _dict['thermostatStatus'] = None
400
+
401
+ # set to None if t_room (nullable) is None
402
+ # and __fields_set__ contains the field
403
+ if self.t_room is None and "t_room" in self.__fields_set__:
404
+ _dict['tRoom'] = None
405
+
406
+ # set to None if t_room_target (nullable) is None
407
+ # and __fields_set__ contains the field
408
+ if self.t_room_target is None and "t_room_target" in self.__fields_set__:
409
+ _dict['tRoomTarget'] = None
410
+
411
+ # set to None if ot_boiler_status (nullable) is None
412
+ # and __fields_set__ contains the field
413
+ if self.ot_boiler_status is None and "ot_boiler_status" in self.__fields_set__:
414
+ _dict['otBoilerStatus'] = None
415
+
416
+ # set to None if ot_boiler_feed_temperature (nullable) is None
417
+ # and __fields_set__ contains the field
418
+ if self.ot_boiler_feed_temperature is None and "ot_boiler_feed_temperature" in self.__fields_set__:
419
+ _dict['otBoilerFeedTemperature'] = None
420
+
421
+ # set to None if ot_boiler_return_temperature (nullable) is None
422
+ # and __fields_set__ contains the field
423
+ if self.ot_boiler_return_temperature is None and "ot_boiler_return_temperature" in self.__fields_set__:
424
+ _dict['otBoilerReturnTemperature'] = None
425
+
426
+ return _dict
427
+
428
+ @classmethod
429
+ def from_dict(cls, obj: dict) -> RawHeatPumpLogDto:
430
+ """Create an instance of RawHeatPumpLogDto from a dict"""
431
+ if obj is None:
432
+ return None
433
+
434
+ if not isinstance(obj, dict):
435
+ return RawHeatPumpLogDto.parse_obj(obj)
436
+
437
+ _obj = RawHeatPumpLogDto.parse_obj({
438
+ "heat_pump_id": obj.get("heatPumpId"),
439
+ "timestamp": obj.get("timestamp"),
440
+ "firmware_revision": obj.get("firmwareRevision"),
441
+ "packet_counter": obj.get("packetCounter"),
442
+ "unix_time_mcu": obj.get("unixTimeMcu"),
443
+ "state": obj.get("state"),
444
+ "rpm_ctrl": obj.get("rpmCtrl"),
445
+ "error": obj.get("error"),
446
+ "error_decoded_dtc_none": obj.get("errorDecodedDtcNone"),
447
+ "error_decoded_dtc_continue": obj.get("errorDecodedDtcContinue"),
448
+ "error_decoded_dtc_compressor_off": obj.get("errorDecodedDtcCompressorOff"),
449
+ "error_decoded_dtc_defrost_forbidden": obj.get("errorDecodedDtcDefrostForbidden"),
450
+ "error_decoded_dtc_request_service": obj.get("errorDecodedDtcRequestService"),
451
+ "error_decoded_dtc_use_heating_curve": obj.get("errorDecodedDtcUseHeatingCurve"),
452
+ "error_decoded_dtc_dhw_forbidden": obj.get("errorDecodedDtcDhwForbidden"),
453
+ "error_decoded_dtc_error": obj.get("errorDecodedDtcError"),
454
+ "error_decoded_dtc_inactive": obj.get("errorDecodedDtcInactive"),
455
+ "heatsink": obj.get("heatsink"),
456
+ "si5": obj.get("si5"),
457
+ "e80": obj.get("e80"),
458
+ "e81": obj.get("e81"),
459
+ "e84": obj.get("e84"),
460
+ "e85": obj.get("e85"),
461
+ "control_bridge_status": obj.get("controlBridgeStatus"),
462
+ "control_bridge_status_decoded_water_pump": obj.get("controlBridgeStatusDecodedWaterPump"),
463
+ "control_bridge_status_decoded_dhw_valve": obj.get("controlBridgeStatusDecodedDhwValve"),
464
+ "control_bridge_status_decoded_gas_boiler": obj.get("controlBridgeStatusDecodedGasBoiler"),
465
+ "control_bridge_status_decoded_electric_heater": obj.get("controlBridgeStatusDecodedElectricHeater"),
466
+ "control_bridge_status_decoded_water_pump2": obj.get("controlBridgeStatusDecodedWaterPump2"),
467
+ "input_status": obj.get("inputStatus"),
468
+ "current_control_method": obj.get("currentControlMethod"),
469
+ "signal_strength": obj.get("signalStrength"),
470
+ "t1": obj.get("t1"),
471
+ "t2": obj.get("t2"),
472
+ "t_spare_ntc": obj.get("tSpareNtc"),
473
+ "t_board": obj.get("tBoard"),
474
+ "t_air_in": obj.get("tAirIn"),
475
+ "t_air_out": obj.get("tAirOut"),
476
+ "t_water_in": obj.get("tWaterIn"),
477
+ "t_water_out": obj.get("tWaterOut"),
478
+ "t_water_house_in": obj.get("tWaterHouseIn"),
479
+ "rpm": obj.get("rpm"),
480
+ "rpm_limiter": obj.get("rpmLimiter"),
481
+ "rpm_limiter_type": obj.get("rpmLimiterType"),
482
+ "p_compressor_in": obj.get("pCompressorIn"),
483
+ "p_compressor_out": obj.get("pCompressorOut"),
484
+ "p_compressor_in_target": obj.get("pCompressorInTarget"),
485
+ "t_inverter": obj.get("tInverter"),
486
+ "t_compressor_in": obj.get("tCompressorIn"),
487
+ "t_compressor_out": obj.get("tCompressorOut"),
488
+ "t_compressor_in_transient": obj.get("tCompressorInTransient"),
489
+ "t_compressor_out_transient": obj.get("tCompressorOutTransient"),
490
+ "delta_t_compressor_in_superheat": obj.get("deltaTCompressorInSuperheat"),
491
+ "compressor_power_low_accuracy": obj.get("compressorPowerLowAccuracy"),
492
+ "fan": obj.get("fan"),
493
+ "fan_power": obj.get("fanPower"),
494
+ "valve": obj.get("valve"),
495
+ "exv_flow_step_gain": obj.get("exvFlowStepGain"),
496
+ "cm_mass_flow": obj.get("cmMassFlow"),
497
+ "cm_mass_power_in": obj.get("cmMassPowerIn"),
498
+ "cm_mass_power_out": obj.get("cmMassPowerOut"),
499
+ "p_requested": obj.get("pRequested"),
500
+ "power_error_integral": obj.get("powerErrorIntegral"),
501
+ "on_off_thermostat_state": obj.get("onOffThermostatState"),
502
+ "thermostat_status": obj.get("thermostatStatus"),
503
+ "t_room": obj.get("tRoom"),
504
+ "t_room_target": obj.get("tRoomTarget"),
505
+ "t_thermostat_setpoint": obj.get("tThermostatSetpoint"),
506
+ "ot_boiler_status": obj.get("otBoilerStatus"),
507
+ "ot_boiler_feed_temperature": obj.get("otBoilerFeedTemperature"),
508
+ "ot_boiler_return_temperature": obj.get("otBoilerReturnTemperature"),
509
+ "interval": obj.get("interval")
510
+ })
511
+ return _obj
512
+
513
+