Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
rytilahti committed Nov 10, 2018
1 parent 9eb1695 commit 5063646
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
@@ -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,

0 comments on commit 5063646

Please sign in to comment.