bwt-api 1.0.1__tar.gz → 1.0.2__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-1.0.1 → bwt_api-1.0.2}/PKG-INFO +1 -1
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/data.py +4 -3
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/smart_dos_api.py +3 -3
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/PKG-INFO +1 -1
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/scm_version.json +2 -2
- {bwt_api-1.0.1 → bwt_api-1.0.2}/.coveragerc +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/.devcontainer/devcontainer.json +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/.github/workflows/python-package.yml +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/.github/workflows/python-publish.yml +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/.gitignore +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/AUTHORS.rst +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/CHANGELOG.rst +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/CONTRIBUTING.rst +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/LICENSE.txt +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/README.rst +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/pyproject.toml +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/setup.cfg +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/setup.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/__init__.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/api.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/bwt.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/bwt_api.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/error.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/exception.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/silk_api.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api/skeleton.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/SOURCES.txt +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/dependency_links.txt +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/entry_points.txt +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/not-zip-safe +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/requires.txt +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/scm_file_list.json +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/src/bwt_api.egg-info/top_level.txt +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/tests/conftest.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/tests/test_api.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/tests/test_distinguish.py +0 -0
- {bwt_api-1.0.1 → bwt_api-1.0.2}/tox.ini +0 -0
|
@@ -5,6 +5,7 @@ import enum
|
|
|
5
5
|
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
from datetime import datetime
|
|
8
|
+
from typing import Optional
|
|
8
9
|
from bwt_api.error import BwtError
|
|
9
10
|
|
|
10
11
|
|
|
@@ -155,9 +156,9 @@ class PouchInfoResponse:
|
|
|
155
156
|
@dataclass
|
|
156
157
|
class RemainingCapacityResponse:
|
|
157
158
|
"""UUID 0402: Remaining Capacity"""
|
|
158
|
-
rem_capacity: float # Remaining volume in ml
|
|
159
|
-
rem_capacity_pct: float # Remaining volume in %
|
|
160
|
-
rem_capacity_days: int # Remaining volume in days
|
|
159
|
+
rem_capacity: Optional[float] # Remaining volume in ml
|
|
160
|
+
rem_capacity_pct: Optional[float] # Remaining volume in %
|
|
161
|
+
rem_capacity_days: Optional[int] # Remaining volume in days
|
|
161
162
|
|
|
162
163
|
|
|
163
164
|
@dataclass
|
|
@@ -115,9 +115,9 @@ class BwtSmartDosApi:
|
|
|
115
115
|
self._logger.debug("Fetching remaining capacity from %s", self._host)
|
|
116
116
|
raw = await self._get_gatt("0402")
|
|
117
117
|
return RemainingCapacityResponse(
|
|
118
|
-
rem_capacity=raw
|
|
119
|
-
rem_capacity_pct=raw
|
|
120
|
-
rem_capacity_days=raw
|
|
118
|
+
rem_capacity=raw.get("remCapacity"),
|
|
119
|
+
rem_capacity_pct=raw.get("remCapacityPct"),
|
|
120
|
+
rem_capacity_days=raw.get("remCapacityDays"),
|
|
121
121
|
)
|
|
122
122
|
|
|
123
123
|
async def get_treated_water(self) -> TreatedWaterResponse:
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|