Fix send command in vacuum Tuya (#64949)
This commit is contained in:
parent
d49b821565
commit
bbf64483e7
1 changed files with 5 additions and 3 deletions
|
@ -200,8 +200,10 @@ class TuyaVacuumEntity(TuyaEntity, StateVacuumEntity):
|
|||
"""Set fan speed."""
|
||||
self._send_command([{"code": DPCode.SUCTION, "value": fan_speed}])
|
||||
|
||||
def send_command(self, command: str, params: str = None, **kwargs: Any) -> None:
|
||||
def send_command(
|
||||
self, command: str, params: list[str] | None = None, **kwargs: Any
|
||||
) -> None:
|
||||
"""Send raw command."""
|
||||
if params is None:
|
||||
if not params:
|
||||
raise ValueError("Params cannot be omitted for Tuya vacuum commands")
|
||||
self._send_command([{"code": command, "value": params}])
|
||||
self._send_command([{"code": command, "value": params[0]}])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue