weheat 2025.1.14__py3-none-any.whl → 2025.1.15__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 +7 -2
- weheat/abstractions/discovery.py +6 -6
- weheat/abstractions/heat_pump.py +11 -15
- weheat/abstractions/user.py +7 -7
- weheat/api/__init__.py +1 -0
- weheat/api/energy_log_api.py +306 -132
- weheat/api/heat_pump_api.py +521 -369
- weheat/api/heat_pump_log_api.py +836 -359
- weheat/api/user_api.py +243 -115
- weheat/api_client.py +234 -261
- weheat/api_response.py +10 -18
- weheat/configuration.py +14 -9
- weheat/exceptions.py +59 -25
- weheat/models/__init__.py +6 -0
- weheat/models/boiler_type.py +8 -3
- weheat/models/device_state.py +9 -4
- weheat/models/dhw_type.py +8 -3
- weheat/models/energy_view_dto.py +81 -66
- weheat/models/heat_pump_log_view_dto.py +527 -481
- weheat/models/heat_pump_model.py +8 -3
- weheat/models/heat_pump_status_enum.py +8 -3
- weheat/models/heat_pump_type.py +8 -3
- weheat/models/raw_heat_pump_log_dto.py +353 -315
- weheat/models/read_all_heat_pump_dto.py +64 -48
- weheat/models/read_heat_pump_dto.py +59 -43
- weheat/models/read_user_dto.py +54 -39
- weheat/models/read_user_me_dto.py +124 -0
- weheat/models/role.py +10 -4
- weheat/rest.py +152 -259
- weheat-2025.1.15.dist-info/METADATA +115 -0
- weheat-2025.1.15.dist-info/RECORD +37 -0
- weheat-2025.1.14.dist-info/METADATA +0 -117
- weheat-2025.1.14.dist-info/RECORD +0 -36
- {weheat-2025.1.14.dist-info → weheat-2025.1.15.dist-info}/LICENSE +0 -0
- {weheat-2025.1.14.dist-info → weheat-2025.1.15.dist-info}/WHEEL +0 -0
- {weheat-2025.1.14.dist-info → weheat-2025.1.15.dist-info}/top_level.txt +0 -0
weheat/models/heat_pump_model.py
CHANGED
|
@@ -12,13 +12,18 @@
|
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
from __future__ import annotations
|
|
15
16
|
import json
|
|
16
17
|
import pprint
|
|
17
18
|
import re # noqa: F401
|
|
18
|
-
from
|
|
19
|
+
from enum import Enum
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
class HeatPumpModel(int, Enum):
|
|
@@ -37,8 +42,8 @@ class HeatPumpModel(int, Enum):
|
|
|
37
42
|
NUMBER_5 = 5
|
|
38
43
|
|
|
39
44
|
@classmethod
|
|
40
|
-
def from_json(cls, json_str: str) ->
|
|
45
|
+
def from_json(cls, json_str: str) -> Self:
|
|
41
46
|
"""Create an instance of HeatPumpModel from a JSON string"""
|
|
42
|
-
return
|
|
47
|
+
return cls(json.loads(json_str))
|
|
43
48
|
|
|
44
49
|
|
|
@@ -12,13 +12,18 @@
|
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
from __future__ import annotations
|
|
15
16
|
import json
|
|
16
17
|
import pprint
|
|
17
18
|
import re # noqa: F401
|
|
18
|
-
from
|
|
19
|
+
from enum import Enum
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
class HeatPumpStatusEnum(int, Enum):
|
|
@@ -39,8 +44,8 @@ class HeatPumpStatusEnum(int, Enum):
|
|
|
39
44
|
NUMBER_180 = 180
|
|
40
45
|
|
|
41
46
|
@classmethod
|
|
42
|
-
def from_json(cls, json_str: str) ->
|
|
47
|
+
def from_json(cls, json_str: str) -> Self:
|
|
43
48
|
"""Create an instance of HeatPumpStatusEnum from a JSON string"""
|
|
44
|
-
return
|
|
49
|
+
return cls(json.loads(json_str))
|
|
45
50
|
|
|
46
51
|
|
weheat/models/heat_pump_type.py
CHANGED
|
@@ -12,13 +12,18 @@
|
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
from __future__ import annotations
|
|
15
16
|
import json
|
|
16
17
|
import pprint
|
|
17
18
|
import re # noqa: F401
|
|
18
|
-
from
|
|
19
|
+
from enum import Enum
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
23
|
+
try:
|
|
24
|
+
from typing import Self
|
|
25
|
+
except ImportError:
|
|
26
|
+
from typing_extensions import Self
|
|
22
27
|
|
|
23
28
|
|
|
24
29
|
class HeatPumpType(int, Enum):
|
|
@@ -35,8 +40,8 @@ class HeatPumpType(int, Enum):
|
|
|
35
40
|
NUMBER_3 = 3
|
|
36
41
|
|
|
37
42
|
@classmethod
|
|
38
|
-
def from_json(cls, json_str: str) ->
|
|
43
|
+
def from_json(cls, json_str: str) -> Self:
|
|
39
44
|
"""Create an instance of HeatPumpType from a JSON string"""
|
|
40
|
-
return
|
|
45
|
+
return cls(json.loads(json_str))
|
|
41
46
|
|
|
42
47
|
|