Don’t send None value within Command parameter value in Overkiz integration (#71582)
parent
6cff2f8571
commit
80d332ddf1
|
@ -68,17 +68,18 @@ class OverkizExecutor:
|
||||||
|
|
||||||
async def async_execute_command(self, command_name: str, *args: Any) -> None:
|
async def async_execute_command(self, command_name: str, *args: Any) -> None:
|
||||||
"""Execute device command in async context."""
|
"""Execute device command in async context."""
|
||||||
|
parameters = [arg for arg in args if arg is not None]
|
||||||
# Set the execution duration to 0 seconds for RTS devices on supported commands
|
# Set the execution duration to 0 seconds for RTS devices on supported commands
|
||||||
# Default execution duration is 30 seconds and will block consecutive commands
|
# Default execution duration is 30 seconds and will block consecutive commands
|
||||||
if (
|
if (
|
||||||
self.device.protocol == Protocol.RTS
|
self.device.protocol == Protocol.RTS
|
||||||
and command_name not in COMMANDS_WITHOUT_DELAY
|
and command_name not in COMMANDS_WITHOUT_DELAY
|
||||||
):
|
):
|
||||||
args = args + (0,)
|
parameters.append(0)
|
||||||
|
|
||||||
exec_id = await self.coordinator.client.execute_command(
|
exec_id = await self.coordinator.client.execute_command(
|
||||||
self.device.device_url,
|
self.device.device_url,
|
||||||
Command(command_name, list(args)),
|
Command(command_name, parameters),
|
||||||
"Home Assistant",
|
"Home Assistant",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue