diff --git a/homeassistant/components/shell_command/__init__.py b/homeassistant/components/shell_command/__init__.py index dc0deef1b82..48744b4fea2 100644 --- a/homeassistant/components/shell_command/__init__.py +++ b/homeassistant/components/shell_command/__init__.py @@ -92,6 +92,9 @@ async def async_setup(hass: HomeAssistant, config: ConfigType) -> bool: if process: with suppress(TypeError): process.kill() + # https://bugs.python.org/issue43884 + # pylint: disable=protected-access + process._transport.close() # type: ignore[attr-defined] del process return