feat(ota): support JSON progress updates

This commit is contained in:
stu2not
2026-10-13 18:12:33 +08:00
parent b6906bc8b6
commit 7d05e78a64
7 changed files with 125 additions and 22 deletions
+7 -1
View File
@@ -146,9 +146,15 @@ async def test_simulated_device_force_ota_dispatches_once_and_completes(monkeypa
await mqtt_service._handle_ota_response(
device_id,
{"status": "updating", "data": {"version": "1.8.5", "progress": 65}},
{
"msg_id": "003",
"status": "updating",
"data": {"target_version": "1.8.5", "progress": 65},
},
)
assert record["update_status"] == "updating"
assert record["firmware_version"] == "1.8.5"
assert record["target_version"] == "1.8.5"
assert record["progress"] == 65.0
await mqtt_service._handle_ota_response(