From ea78f419a998146c7a0d35bba6cbbae6fc801868 Mon Sep 17 00:00:00 2001 From: Luke Lashley Date: Tue, 19 Sep 2023 10:35:23 -0400 Subject: [PATCH] Fix Roborock send command service calling not being enum (#100574) --- homeassistant/components/roborock/device.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/roborock/device.py b/homeassistant/components/roborock/device.py index 27f25208a4e..2b005ecade6 100644 --- a/homeassistant/components/roborock/device.py +++ b/homeassistant/components/roborock/device.py @@ -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