Skip to content
Snippets Groups Projects
Commit a91b0058 authored by LE LAY Olivier's avatar LE LAY Olivier Committed by Ville Skyttä
Browse files

Fix ble_tracker randomly pygatt thrown error (#28671)

* fix(ble_tracker): catch randomly pygatt thrown error

* fix(ble_tracker): merge except errors
parent 5d8dda4f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment