weheat 2025.1.14rc1__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.
- weheat/__init__.py +45 -0
- weheat/abstractions/__init__.py +3 -0
- weheat/abstractions/auth.py +34 -0
- weheat/abstractions/discovery.py +62 -0
- weheat/abstractions/heat_pump.py +273 -0
- weheat/abstractions/user.py +23 -0
- weheat/api/__init__.py +7 -0
- weheat/api/energy_log_api.py +230 -0
- weheat/api/heat_pump_api.py +532 -0
- weheat/api/heat_pump_log_api.py +554 -0
- weheat/api/user_api.py +193 -0
- weheat/api_client.py +766 -0
- weheat/api_response.py +29 -0
- weheat/configuration.py +442 -0
- weheat/exceptions.py +166 -0
- weheat/models/__init__.py +24 -0
- weheat/models/boiler_type.py +42 -0
- weheat/models/device_state.py +46 -0
- weheat/models/dhw_type.py +41 -0
- weheat/models/energy_view_dto.py +121 -0
- weheat/models/heat_pump_log_view_dto.py +771 -0
- weheat/models/heat_pump_model.py +44 -0
- weheat/models/heat_pump_status_enum.py +46 -0
- weheat/models/heat_pump_type.py +42 -0
- weheat/models/raw_heat_pump_log_dto.py +517 -0
- weheat/models/read_all_heat_pump_dto.py +124 -0
- weheat/models/read_heat_pump_dto.py +117 -0
- weheat/models/read_user_dto.py +102 -0
- weheat/models/role.py +46 -0
- weheat/py.typed +0 -0
- weheat/rest.py +327 -0
- weheat-2025.1.14rc1.dist-info/LICENSE +21 -0
- weheat-2025.1.14rc1.dist-info/METADATA +117 -0
- weheat-2025.1.14rc1.dist-info/RECORD +36 -0
- weheat-2025.1.14rc1.dist-info/WHEEL +5 -0
- weheat-2025.1.14rc1.dist-info/top_level.txt +1 -0
|
@@ -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 DeviceState(int, Enum):
|
|
25
|
+
"""
|
|
26
|
+
State of the device: - Production (0), - InStock (1), - Sold (2), - Active (3), - Inactive (4), - Broken (5), - Test (6) - Configured (7) For now Production, InStock and Sold will only be applicable to Devices that can be actually installed in installation
|
|
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
|
+
NUMBER_4 = 4
|
|
37
|
+
NUMBER_5 = 5
|
|
38
|
+
NUMBER_6 = 6
|
|
39
|
+
NUMBER_7 = 7
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_json(cls, json_str: str) -> DeviceState:
|
|
43
|
+
"""Create an instance of DeviceState from a JSON string"""
|
|
44
|
+
return DeviceState(json.loads(json_str))
|
|
45
|
+
|
|
46
|
+
|
|
@@ -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 DhwType(int, Enum):
|
|
25
|
+
"""
|
|
26
|
+
DHW Type of the heat pump - Unknown: Not known if DHW is available (0) - DhwAvailable: DHW is available (1) - DhwUnavailable: DHW is not available (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) -> DhwType:
|
|
38
|
+
"""Create an instance of DhwType from a JSON string"""
|
|
39
|
+
return DhwType(json.loads(json_str))
|
|
40
|
+
|
|
41
|
+
|
|
@@ -0,0 +1,121 @@
|
|
|
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
|
+
try:
|
|
23
|
+
from pydantic.v1 import BaseModel, Field, StrictFloat, StrictInt, StrictStr
|
|
24
|
+
except ImportError:
|
|
25
|
+
from pydantic import BaseModel, Field, StrictFloat, StrictInt, StrictStr
|
|
26
|
+
|
|
27
|
+
class EnergyViewDto(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
EnergyViewDto
|
|
30
|
+
"""
|
|
31
|
+
interval: Optional[StrictStr] = Field(None, description="Interval of this EnergyViewDto (Correct intervals include: \"Hour\", \"Day\", \"Week\", \"Month\", \"Year\")")
|
|
32
|
+
time_bucket: Optional[datetime] = Field(None, alias="timeBucket")
|
|
33
|
+
total_ein_heating: Union[StrictFloat, StrictInt] = Field(..., alias="totalEInHeating", description="Total energy from electricity going into the heat pump for heating for this interval (in kwh)")
|
|
34
|
+
total_ein_dhw: Union[StrictFloat, StrictInt] = Field(..., alias="totalEInDhw", description="Total energy from electricity going into the heat pump for doing DHW for this interval (in kwh)")
|
|
35
|
+
total_ein_heating_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="totalEInHeatingDefrost", description="Total energy from electricity going into the heat pump for defrosting whilst heating for this interval (in kwh)")
|
|
36
|
+
total_ein_dhw_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="totalEInDhwDefrost", description="Total energy from electricity going into the heat pump for defrosting whilst doing DHW for this interval (in kwh)")
|
|
37
|
+
total_ein_cooling: Union[StrictFloat, StrictInt] = Field(..., alias="totalEInCooling", description="Total energy from electricity going into the heat pump for cooling for this interval (in kwh)")
|
|
38
|
+
total_e_out_heating: Union[StrictFloat, StrictInt] = Field(..., alias="totalEOutHeating", description="Total energy from electricity going out of the heat pump for heating for this interval (in kwh)")
|
|
39
|
+
total_e_out_dhw: Union[StrictFloat, StrictInt] = Field(..., alias="totalEOutDhw", description="Total energy from electricity going out of the heat pump for doing DHW for this interval (in kwh)")
|
|
40
|
+
total_e_out_heating_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="totalEOutHeatingDefrost", description="Total energy from electricity going out of the heat pump for defrosting whilst heating for this interval (in kwh)")
|
|
41
|
+
total_e_out_dhw_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="totalEOutDhwDefrost", description="Total energy from electricity going out of the heat pump for defrosting whilst doing DHW for this interval (in kwh)")
|
|
42
|
+
total_e_out_cooling: Union[StrictFloat, StrictInt] = Field(..., alias="totalEOutCooling", description="Total energy from electricity going out of the heat pump for cooling for this interval (in kwh)")
|
|
43
|
+
average_power_ein_heating: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEInHeating", description="Average power from electricity going into the heat pump for heating for this interval (in kW)")
|
|
44
|
+
average_power_ein_dhw: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEInDhw", description="Average power from electricity going into the heat pump for doing DHW for this interval (in kW)")
|
|
45
|
+
average_power_ein_heating_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEInHeatingDefrost", description="Average power from electricity going into the heat pump for defrosting whilst heating for this interval (in kW)")
|
|
46
|
+
average_power_ein_dhw_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEInDhwDefrost", description="Average power from electricity going into the heat pump for defrosting whilst doing DHW for this interval (in kW)")
|
|
47
|
+
average_power_ein_cooling: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEInCooling", description="Average power from electricity going into the heat pump for cooling for this interval (in kW)")
|
|
48
|
+
average_power_e_out_heating: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEOutHeating", description="Average power from electricity going out of the heat pump for heating for this interval (in kW)")
|
|
49
|
+
average_power_e_out_dhw: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEOutDhw", description="Average power from electricity going out of the heat pump for doing DHW for this interval (in kW)")
|
|
50
|
+
average_power_e_out_heating_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEOutHeatingDefrost", description="Average power from electricity going out of the heat pump for defrosting whilst heating for this interval (in kW)")
|
|
51
|
+
average_power_e_out_dhw_defrost: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEOutDhwDefrost", description="Average power from electricity going out of the heat pump for defrosting whilst doing DHW for this interval (in kW)")
|
|
52
|
+
average_power_e_out_cooling: Union[StrictFloat, StrictInt] = Field(..., alias="averagePowerEOutCooling", description="Average power from electricity going out of the heat pump for cooling for this interval (in kW)")
|
|
53
|
+
__properties = ["interval", "timeBucket", "totalEInHeating", "totalEInDhw", "totalEInHeatingDefrost", "totalEInDhwDefrost", "totalEInCooling", "totalEOutHeating", "totalEOutDhw", "totalEOutHeatingDefrost", "totalEOutDhwDefrost", "totalEOutCooling", "averagePowerEInHeating", "averagePowerEInDhw", "averagePowerEInHeatingDefrost", "averagePowerEInDhwDefrost", "averagePowerEInCooling", "averagePowerEOutHeating", "averagePowerEOutDhw", "averagePowerEOutHeatingDefrost", "averagePowerEOutDhwDefrost", "averagePowerEOutCooling"]
|
|
54
|
+
|
|
55
|
+
class Config:
|
|
56
|
+
"""Pydantic configuration"""
|
|
57
|
+
allow_population_by_field_name = True
|
|
58
|
+
validate_assignment = True
|
|
59
|
+
|
|
60
|
+
def to_str(self) -> str:
|
|
61
|
+
"""Returns the string representation of the model using alias"""
|
|
62
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
63
|
+
|
|
64
|
+
def to_json(self) -> str:
|
|
65
|
+
"""Returns the JSON representation of the model using alias"""
|
|
66
|
+
return json.dumps(self.to_dict())
|
|
67
|
+
|
|
68
|
+
@classmethod
|
|
69
|
+
def from_json(cls, json_str: str) -> EnergyViewDto:
|
|
70
|
+
"""Create an instance of EnergyViewDto from a JSON string"""
|
|
71
|
+
return cls.from_dict(json.loads(json_str))
|
|
72
|
+
|
|
73
|
+
def to_dict(self):
|
|
74
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
75
|
+
_dict = self.dict(by_alias=True,
|
|
76
|
+
exclude={
|
|
77
|
+
},
|
|
78
|
+
exclude_none=True)
|
|
79
|
+
# set to None if interval (nullable) is None
|
|
80
|
+
# and __fields_set__ contains the field
|
|
81
|
+
if self.interval is None and "interval" in self.__fields_set__:
|
|
82
|
+
_dict['interval'] = None
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: dict) -> EnergyViewDto:
|
|
88
|
+
"""Create an instance of EnergyViewDto from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return EnergyViewDto.parse_obj(obj)
|
|
94
|
+
|
|
95
|
+
_obj = EnergyViewDto.parse_obj({
|
|
96
|
+
"interval": obj.get("interval"),
|
|
97
|
+
"time_bucket": obj.get("timeBucket"),
|
|
98
|
+
"total_ein_heating": obj.get("totalEInHeating"),
|
|
99
|
+
"total_ein_dhw": obj.get("totalEInDhw"),
|
|
100
|
+
"total_ein_heating_defrost": obj.get("totalEInHeatingDefrost"),
|
|
101
|
+
"total_ein_dhw_defrost": obj.get("totalEInDhwDefrost"),
|
|
102
|
+
"total_ein_cooling": obj.get("totalEInCooling"),
|
|
103
|
+
"total_e_out_heating": obj.get("totalEOutHeating"),
|
|
104
|
+
"total_e_out_dhw": obj.get("totalEOutDhw"),
|
|
105
|
+
"total_e_out_heating_defrost": obj.get("totalEOutHeatingDefrost"),
|
|
106
|
+
"total_e_out_dhw_defrost": obj.get("totalEOutDhwDefrost"),
|
|
107
|
+
"total_e_out_cooling": obj.get("totalEOutCooling"),
|
|
108
|
+
"average_power_ein_heating": obj.get("averagePowerEInHeating"),
|
|
109
|
+
"average_power_ein_dhw": obj.get("averagePowerEInDhw"),
|
|
110
|
+
"average_power_ein_heating_defrost": obj.get("averagePowerEInHeatingDefrost"),
|
|
111
|
+
"average_power_ein_dhw_defrost": obj.get("averagePowerEInDhwDefrost"),
|
|
112
|
+
"average_power_ein_cooling": obj.get("averagePowerEInCooling"),
|
|
113
|
+
"average_power_e_out_heating": obj.get("averagePowerEOutHeating"),
|
|
114
|
+
"average_power_e_out_dhw": obj.get("averagePowerEOutDhw"),
|
|
115
|
+
"average_power_e_out_heating_defrost": obj.get("averagePowerEOutHeatingDefrost"),
|
|
116
|
+
"average_power_e_out_dhw_defrost": obj.get("averagePowerEOutDhwDefrost"),
|
|
117
|
+
"average_power_e_out_cooling": obj.get("averagePowerEOutCooling")
|
|
118
|
+
})
|
|
119
|
+
return _obj
|
|
120
|
+
|
|
121
|
+
|