mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +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():
|
def discover_ble_devices():
|
||||||
"""Discover Bluetooth LE devices."""
|
"""Discover Bluetooth LE devices."""
|
||||||
_LOGGER.debug("Discovering Bluetooth LE devices")
|
_LOGGER.debug("Discovering Bluetooth LE devices")
|
||||||
service = DiscoveryService()
|
try:
|
||||||
devices = service.discover(duration)
|
service = DiscoveryService()
|
||||||
_LOGGER.debug("Bluetooth LE devices discovered = %s", devices)
|
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
|
return devices
|
||||||
|
|
||||||
yaml_path = hass.config.path(YAML_DEVICES)
|
yaml_path = hass.config.path(YAML_DEVICES)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user