rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.68k stars 552 forks source link

Handle null-valued ins and outs for miotaction #1943

Open rytilahti opened 3 months ago

rytilahti commented 3 months ago

This PR parses null-valued ins & outs for miotactions as empty lists to avoid crashing on unexpected schemas.

Example seen in the wild (roidmi.vacuum.v66):

{
    "iid": 3,
    "type": "urn:miot-spec-v2:action:start-room-sweep:00002826:roidmi-v66:1",
    "description": "Start Room Sweep",
    "in": [
        9
    ],
    "out": null
}

Fixes #1942