feat(ota): support JSON progress updates
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user