mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Ensure bluetooth can be reloaded when hot plugging a bluetooth adapter (#75699)
This commit is contained in:
@@ -440,5 +440,11 @@ class BluetoothManager:
|
||||
self._cancel_unavailable_tracking()
|
||||
self._cancel_unavailable_tracking = None
|
||||
if self.scanner:
|
||||
await self.scanner.stop()
|
||||
try:
|
||||
await self.scanner.stop()
|
||||
except BleakError as ex:
|
||||
# This is not fatal, and they may want to reload
|
||||
# the config entry to restart the scanner if they
|
||||
# change the bluetooth dongle.
|
||||
_LOGGER.error("Error stopping scanner: %s", ex)
|
||||
uninstall_multiple_bleak_catcher()
|
||||
|
||||
Reference in New Issue
Block a user