Skip to content

Commit

Permalink
Force parameters to be an empty list if none is given
Browse files Browse the repository at this point in the history
This seems to work fine with yeelight and gen1 vacuum,
however, more testing is needed with other devices and/or this change
should only be done for the vacuum.

Related to #348 / Xiaowa E352
  • Loading branch information
rytilahti committed Nov 10, 2018
1 parent a271245 commit 7a5a0ea
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions miio/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ def send(self, command: str, parameters: Any=None, retry_count=3) -> Any:

if parameters is not None:
cmd["params"] = parameters
else:
cmd["params"] = []

send_ts = self._device_ts + datetime.timedelta(seconds=1)
header = {'length': 0, 'unknown': 0x00000000,
Expand Down

0 comments on commit 7a5a0ea

Please sign in to comment.