beatbot-cloud 0.4.3__tar.gz → 0.4.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.
- {beatbot_cloud-0.4.3/src/beatbot_cloud.egg-info → beatbot_cloud-0.4.4}/PKG-INFO +1 -1
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/pyproject.toml +1 -1
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/client.py +3 -3
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/models.py +3 -3
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4/src/beatbot_cloud.egg-info}/PKG-INFO +1 -1
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/tests/test_client.py +18 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/LICENSE +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/README.md +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/setup.cfg +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/__init__.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/auth.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/const.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/event_client.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/exceptions.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/protocol.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/py.typed +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud/websocket.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud.egg-info/SOURCES.txt +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud.egg-info/dependency_links.txt +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud.egg-info/requires.txt +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/src/beatbot_cloud.egg-info/top_level.txt +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/tests/test_auth.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/tests/test_event_client.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/tests/test_protocol.py +0 -0
- {beatbot_cloud-0.4.3 → beatbot_cloud-0.4.4}/tests/test_websocket.py +0 -0
|
@@ -165,10 +165,10 @@ class BeatbotClient:
|
|
|
165
165
|
product_category=device.get("productCategory") or "",
|
|
166
166
|
name=device.get("name") or "",
|
|
167
167
|
model=device.get("model") or "",
|
|
168
|
-
work_status=
|
|
168
|
+
work_status=None,
|
|
169
169
|
work_mode=0,
|
|
170
|
-
error_code=
|
|
171
|
-
battery_level=
|
|
170
|
+
error_code=None,
|
|
171
|
+
battery_level=None,
|
|
172
172
|
versions=versions,
|
|
173
173
|
is_online=bool(device.get("isOnline", False)),
|
|
174
174
|
work_mode_options=BeatbotClient._parse_work_mode_options(capabilities),
|
|
@@ -40,10 +40,10 @@ class BeatbotDeviceData:
|
|
|
40
40
|
device_id: str
|
|
41
41
|
product_id: str
|
|
42
42
|
product_category: str
|
|
43
|
-
work_status: int
|
|
43
|
+
work_status: int | None
|
|
44
44
|
work_mode: int
|
|
45
|
-
error_code: int
|
|
46
|
-
battery_level: int
|
|
45
|
+
error_code: int | None
|
|
46
|
+
battery_level: int | None
|
|
47
47
|
versions: list[FirmwareVersion]
|
|
48
48
|
is_online: bool
|
|
49
49
|
child_lock: bool = False
|
|
@@ -320,3 +320,21 @@ async def test_actions():
|
|
|
320
320
|
{"interfaceInfo": "select.work_mode", "label": "quick"},
|
|
321
321
|
{"interfaceInfo": "switch.child_lock", "label": "on"},
|
|
322
322
|
]
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
async def test_discovery_runtime_values_remain_unknown_until_reported() -> None:
|
|
326
|
+
"""Distinguish missing state from explicitly reported zero values."""
|
|
327
|
+
api, _ = client(envelope({"devices": [{"deviceId": "d1", "isOnline": True}]}))
|
|
328
|
+
(device,) = await api.get_devices()
|
|
329
|
+
assert device.work_status is None
|
|
330
|
+
assert device.battery_level is None
|
|
331
|
+
assert device.error_code is None
|
|
332
|
+
|
|
333
|
+
device.apply_state({"vacuum.state": 2})
|
|
334
|
+
assert device.work_status == 2
|
|
335
|
+
assert device.battery_level is None
|
|
336
|
+
assert device.error_code is None
|
|
337
|
+
|
|
338
|
+
device.apply_state({"vacuum.battery": 0, "sensor.error": 0})
|
|
339
|
+
assert device.battery_level == 0
|
|
340
|
+
assert device.error_code == 0
|
|
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
|