Fix Roborock send command service calling not being enum (#100574)
This commit is contained in:
parent
a2a62839bc
commit
ea78f419a9
1 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ class RoborockEntity(Entity):
|
|||
|
||||
async def send(
|
||||
self,
|
||||
command: RoborockCommand,
|
||||
command: RoborockCommand | str,
|
||||
params: dict[str, Any] | list[Any] | int | None = None,
|
||||
) -> dict:
|
||||
"""Send a command to a vacuum cleaner."""
|
||||
|
@ -48,7 +48,7 @@ class RoborockEntity(Entity):
|
|||
response = await self._api.send_command(command, params)
|
||||
except RoborockException as err:
|
||||
raise HomeAssistantError(
|
||||
f"Error while calling {command.name} with {params}"
|
||||
f"Error while calling {command.name if isinstance(command, RoborockCommand) else command} with {params}"
|
||||
) from err
|
||||
|
||||
return response
|
||||
|
|
Loading…
Add table
Reference in a new issue