mirror of
https://github.com/home-assistant/core
synced 2024-09-28 03:04:04 +02:00
Fix ble_tracker randomly pygatt thrown error (#28671)
* fix(ble_tracker): catch randomly pygatt thrown error * fix(ble_tracker): merge except errors
This commit is contained in:
parent
5d8dda4f68
commit
a91b005822
@ -77,7 +77,7 @@ def setup_scanner(hass, config, see, discovery_info=None):
|
||||
|
||||
devices = {x["address"]: x["name"] for x in devs}
|
||||
_LOGGER.debug("Bluetooth LE devices discovered = %s", devices)
|
||||
except RuntimeError as error:
|
||||
except (RuntimeError, pygatt.exceptions.BLEError) as error:
|
||||
_LOGGER.error("Error during Bluetooth LE scan: %s", error)
|
||||
return {}
|
||||
return devices
|
||||
|
Loading…
Reference in New Issue
Block a user