mirror of
https://github.com/home-assistant/core.git
synced 2025-07-16 01:37:08 +00:00
Bugfix: ctach Runtime errors (#3153)
"RuntimeError: Disable scan failed" has been seen in a live installation
This commit is contained in:
parent
290ec9b4ac
commit
db7f6a328f
@ -58,10 +58,13 @@ def setup_scanner(hass, config, see):
|
||||
def discover_ble_devices():
|
||||
"""Discover Bluetooth LE devices."""
|
||||
_LOGGER.debug("Discovering Bluetooth LE devices")
|
||||
service = DiscoveryService()
|
||||
devices = service.discover(duration)
|
||||
_LOGGER.debug("Bluetooth LE devices discovered = %s", devices)
|
||||
|
||||
try:
|
||||
service = DiscoveryService()
|
||||
devices = service.discover(duration)
|
||||
_LOGGER.debug("Bluetooth LE devices discovered = %s", devices)
|
||||
except RuntimeError as error:
|
||||
_LOGGER.error("Error during Bluetooth LE scan: %s", error)
|
||||
devices = []
|
||||
return devices
|
||||
|
||||
yaml_path = hass.config.path(YAML_DEVICES)
|
||||
|
Loading…
x
Reference in New Issue
Block a user