mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 13:57:10 +00:00
Fix send command in vacuum Tuya (#64949)
This commit is contained in:
parent
d49b821565
commit
bbf64483e7
@ -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…
x
Reference in New Issue
Block a user