diff --git a/homeassistant/components/usb/__init__.py b/homeassistant/components/usb/__init__.py index 3a05da085d8..c6a18a27b42 100644 --- a/homeassistant/components/usb/__init__.py +++ b/homeassistant/components/usb/__init__.py @@ -205,11 +205,17 @@ class USBDiscovery: """Set up USB Discovery.""" await self._async_start_monitor() self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STARTED, self.async_start) + self.hass.bus.async_listen_once(EVENT_HOMEASSISTANT_STOP, self.async_stop) async def async_start(self, event: Event) -> None: """Start USB Discovery and run a manual scan.""" await self._async_scan_serial() + async def async_stop(self, event: Event) -> None: + """Stop USB Discovery.""" + if self._request_debouncer: + await self._request_debouncer.async_shutdown() + async def _async_start_monitor(self) -> None: """Start monitoring hardware with pyudev.""" if not sys.platform.startswith("linux"):