Closed matan-h closed 2 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 81.45%. Comparing base (
8643a57
) to head (0eec5d8
). Report is 1 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Is the command still working, but just returning invalid json? Otherwise looks fine for me, thanks for the PR!
@rytilahti this is an interesting story. e10 is a cheap model that don't support maps. However, it still has the maps commands, just in a way no one can access them: there is only one map called "hello" with index 0, and according to the spec, map indexes start from one. So this corrupted json is the robot confused and returning empty result. (probably something like f"results:get_results(),exec_time:get_time()"
)
Heh, yeah, some firmware behave weirdly on error states, likely for the reason you mention. Would you mind adding a unit test similar as https://github.com/rytilahti/python-miio/blob/master/miio/tests/test_protocol.py#L129 for this quirk?
Version: Firmware version:
2.2.4_0050
Hardware version:esp32
some commands (e.g.
genericmiot call map:rename-map '[0,"string"]'
) generate json-like string like this:and this produce the error:
I fix that by removing the nonsense
result":,
.