bwt-api 0.6.0__tar.gz → 0.6.1__tar.gz
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.
- {bwt_api-0.6.0 → bwt_api-0.6.1}/PKG-INFO +1 -1
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api/api.py +2 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api/error.py +12 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api.egg-info/PKG-INFO +1 -1
- {bwt_api-0.6.0 → bwt_api-0.6.1}/tests/test_api.py +2 -1
- {bwt_api-0.6.0 → bwt_api-0.6.1}/.coveragerc +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/.devcontainer/devcontainer.json +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/.github/workflows/python-package.yml +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/.github/workflows/python-publish.yml +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/.gitignore +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/AUTHORS.rst +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/CHANGELOG.rst +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/CONTRIBUTING.rst +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/LICENSE.txt +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/README.rst +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/pyproject.toml +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/setup.cfg +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/setup.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api/__init__.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api/bwt.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api/data.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api/exception.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api/skeleton.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api.egg-info/SOURCES.txt +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api.egg-info/dependency_links.txt +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api.egg-info/entry_points.txt +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api.egg-info/not-zip-safe +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api.egg-info/requires.txt +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/src/bwt_api.egg-info/top_level.txt +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/tests/conftest.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/tests/test_distinguish.py +0 -0
- {bwt_api-0.6.0 → bwt_api-0.6.1}/tox.ini +0 -0
|
@@ -66,6 +66,8 @@ class BwtApi:
|
|
|
66
66
|
_logger.debug(f"Fetching current data from {self._host}")
|
|
67
67
|
raw = await self.__get_data("GetCurrentData")
|
|
68
68
|
errors = [BwtError(int(error)) for error in raw["ActiveErrorIDs"].split(",") if error]
|
|
69
|
+
if BwtError.UNKNOWN in errors:
|
|
70
|
+
_logger.warning(f"Unknown error in current data response {raw['ActiveErrorIDs']}")
|
|
69
71
|
perla_one = raw["CapacityColumn2_ml_dH"] == -1
|
|
70
72
|
|
|
71
73
|
in_hardness = Hardness(
|
|
@@ -5,6 +5,7 @@ import enum
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
class BwtError(enum.Enum):
|
|
8
|
+
UNKNOWN = -1 # Fallback for unknown errors
|
|
8
9
|
OFFLINE_MOTOR_1 = 1
|
|
9
10
|
OFFLINE_MOTOR_2 = 2
|
|
10
11
|
OFFLINE_MOTOR_BLEND = 3
|
|
@@ -49,6 +50,17 @@ class BwtError(enum.Enum):
|
|
|
49
50
|
BRINE_UNSATURATED = 75
|
|
50
51
|
DOSING_FAULT = 88
|
|
51
52
|
|
|
53
|
+
def __new__(cls, value):
|
|
54
|
+
obj = object.__new__(cls)
|
|
55
|
+
obj._value_ = value
|
|
56
|
+
return obj
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def _missing_(cls, value):
|
|
60
|
+
obj = cls.UNKNOWN
|
|
61
|
+
obj._value_ = value
|
|
62
|
+
return obj
|
|
63
|
+
|
|
52
64
|
def is_fatal(self) -> bool:
|
|
53
65
|
return self not in WARNING_CODES
|
|
54
66
|
|
|
@@ -17,7 +17,7 @@ __license__ = "MIT"
|
|
|
17
17
|
|
|
18
18
|
current_json = """
|
|
19
19
|
{
|
|
20
|
-
"ActiveErrorIDs" : "5,32,34",
|
|
20
|
+
"ActiveErrorIDs" : "5,32,34,29",
|
|
21
21
|
"BlendedWaterSinceSetup_l" : 318383,
|
|
22
22
|
"CapacityColumn1_ml_dH" : 5485275,
|
|
23
23
|
"CapacityColumn2_ml_dH" : 3833994,
|
|
@@ -158,6 +158,7 @@ async def test_current_data():
|
|
|
158
158
|
BwtError.REGENERATIV_20,
|
|
159
159
|
BwtError.MAINTENANCE_CUSTOMER,
|
|
160
160
|
BwtError.MAINTENANCE_SERVICE,
|
|
161
|
+
BwtError.UNKNOWN,
|
|
161
162
|
],
|
|
162
163
|
blended_total=318383,
|
|
163
164
|
capacity_1=5485275,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|