bwt-api 1.0.3__tar.gz → 1.0.4__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.
Files changed (48) hide show
  1. {bwt_api-1.0.3 → bwt_api-1.0.4}/PKG-INFO +1 -1
  2. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/data.py +12 -46
  3. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/PKG-INFO +1 -1
  4. bwt_api-1.0.4/src/bwt_api.egg-info/scm_version.json +8 -0
  5. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0104.json +1 -1
  6. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0201.json +2 -2
  7. bwt_api-1.0.3/src/bwt_api.egg-info/scm_version.json +0 -8
  8. {bwt_api-1.0.3 → bwt_api-1.0.4}/.coveragerc +0 -0
  9. {bwt_api-1.0.3 → bwt_api-1.0.4}/.devcontainer/devcontainer.json +0 -0
  10. {bwt_api-1.0.3 → bwt_api-1.0.4}/.github/workflows/python-package.yml +0 -0
  11. {bwt_api-1.0.3 → bwt_api-1.0.4}/.github/workflows/python-publish.yml +0 -0
  12. {bwt_api-1.0.3 → bwt_api-1.0.4}/.gitignore +0 -0
  13. {bwt_api-1.0.3 → bwt_api-1.0.4}/LICENSE.txt +0 -0
  14. {bwt_api-1.0.3 → bwt_api-1.0.4}/README.rst +0 -0
  15. {bwt_api-1.0.3 → bwt_api-1.0.4}/pyproject.toml +0 -0
  16. {bwt_api-1.0.3 → bwt_api-1.0.4}/setup.cfg +0 -0
  17. {bwt_api-1.0.3 → bwt_api-1.0.4}/setup.py +0 -0
  18. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/__init__.py +0 -0
  19. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/api.py +0 -0
  20. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/bwt.py +0 -0
  21. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/bwt_api.py +0 -0
  22. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/error.py +0 -0
  23. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/exception.py +0 -0
  24. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/silk_api.py +0 -0
  25. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/skeleton.py +0 -0
  26. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api/smart_dos_api.py +0 -0
  27. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/SOURCES.txt +0 -0
  28. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/dependency_links.txt +0 -0
  29. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/entry_points.txt +0 -0
  30. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/not-zip-safe +0 -0
  31. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/requires.txt +0 -0
  32. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/scm_file_list.json +0 -0
  33. {bwt_api-1.0.3 → bwt_api-1.0.4}/src/bwt_api.egg-info/top_level.txt +0 -0
  34. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/conftest.py +0 -0
  35. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/perla/GetCurrentData.json +0 -0
  36. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/perla/GetDailyData.json +0 -0
  37. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/perla/GetMonthlyData.json +0 -0
  38. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/perla/GetYearlyData.json +0 -0
  39. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/silk/registers.json +0 -0
  40. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0202.json +0 -0
  41. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0208.json +0 -0
  42. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0401.json +0 -0
  43. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0402.json +0 -0
  44. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0503.json +0 -0
  45. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/data/smartdos/gatt_0505.json +0 -0
  46. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/test_api.py +0 -0
  47. {bwt_api-1.0.3 → bwt_api-1.0.4}/tests/test_distinguish.py +0 -0
  48. {bwt_api-1.0.3 → bwt_api-1.0.4}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bwt_api
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Python API to access the local BWT Perla API.
5
5
  Home-page: https://github.com/dkarv/bwt_api
6
6
  Author: dkarv
@@ -33,55 +33,21 @@ class SmartDosStatus(enum.IntEnum):
33
33
  def _missing_(cls, value):
34
34
  return None
35
35
 
36
- @classmethod
37
- def normal(cls) -> list["SmartDosStatus"]:
38
- """Return SmartDosStatus values considered normal/OK."""
39
- return [
40
- cls.STANDBY,
41
- cls.METERING_ACTIVE,
42
- ]
36
+ def is_fatal(self) -> bool:
37
+ return self not in WARNING_CODES
43
38
 
44
- @classmethod
45
- def warning(cls) -> list["SmartDosStatus"]:
46
- """Return SmartDosStatus values that indicate warnings."""
47
- return [
48
- cls.MINERAL_CONTAINER_LEVEL_LOW,
49
- cls.SMART_MINERAL_RUNNING_LOW,
50
- ]
39
+ def is_normal(self) -> bool:
40
+ return self in NORMAL_CODES
51
41
 
52
- @classmethod
53
- def error(cls) -> list["SmartDosStatus"]:
54
- """Return SmartDosStatus values that indicate errors."""
55
- return [
56
- cls.MINERAL_CONTAINER_EMPTY,
57
- cls.PUMP_FAULT,
58
- cls.PUMP_POWER_FAULT,
59
- cls.SMART_MINERAL_RUN_OUT,
60
- cls.AQA_VOLUME_ALARM,
61
- cls.AQA_WATCH_ALARM,
62
- cls.AQA_MAXFLOW_ALARM,
63
- cls.PUMP_CONTROL_FAULT,
64
- ]
42
+ NORMAL_CODES = [
43
+ SmartDosStatus.STANDBY,
44
+ SmartDosStatus.METERING_ACTIVE,
45
+ ]
65
46
 
66
- @classmethod
67
- def category(cls, value) -> BwtStatus | None:
68
- """Return the `BwtStatus` category for a SmartDosStatus value.
69
-
70
- Accepts either an int or a SmartDosStatus member. Returns `BwtStatus.OK`,
71
- `BwtStatus.WARNING`, or `BwtStatus.ERROR`, or `None` for unknown values.
72
- """
73
- try:
74
- status = cls(value)
75
- except Exception:
76
- return None
77
-
78
- if status in cls.normal():
79
- return BwtStatus.OK
80
- if status in cls.warning():
81
- return BwtStatus.WARNING
82
- if status in cls.error():
83
- return BwtStatus.ERROR
84
- return None
47
+ WARNING_CODES = [
48
+ SmartDosStatus.MINERAL_CONTAINER_LEVEL_LOW,
49
+ SmartDosStatus.SMART_MINERAL_RUNNING_LOW,
50
+ ]
85
51
 
86
52
 
87
53
  class SubstanceType(enum.IntEnum):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bwt_api
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: Python API to access the local BWT Perla API.
5
5
  Home-page: https://github.com/dkarv/bwt_api
6
6
  Author: dkarv
@@ -0,0 +1,8 @@
1
+ {
2
+ "tag": "1.0.4",
3
+ "distance": 0,
4
+ "node": "g104722c353ad914ee1e375179ceb8f46d4f1766f",
5
+ "dirty": false,
6
+ "branch": "HEAD",
7
+ "node_date": "2026-08-05"
8
+ }
@@ -1,5 +1,5 @@
1
1
  {
2
- "ssid": "Graf WLAN",
2
+ "ssid": "MyWiFi",
3
3
  "rssi": null,
4
4
  "rssiAvg": "-54.00",
5
5
  "rssiSig": "0.00",
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "fwRev": "1.2.0",
3
3
  "hwRev": "2.4.0(A)",
4
- "productCode": "3HZR-1R37",
5
- "iotDevId": "5b29b9e9-24c5-4eea-a599-927922a89f5a",
4
+ "productCode": "1AAA-2BBB",
5
+ "iotDevId": "abcdefgh-1234-5678-abcd-1234567890ab",
6
6
  "iotDevType": "bwt_bewados",
7
7
  "iotDevVariant": "dev",
8
8
  "uptime": 6510811,
@@ -1,8 +0,0 @@
1
- {
2
- "tag": "1.0.3",
3
- "distance": 0,
4
- "node": "g59008971f6a96776cdf5cac562c45f27f148eec7",
5
- "dirty": false,
6
- "branch": "HEAD",
7
- "node_date": "2026-08-04"
8
- }
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