Skip to content

Commit

Permalink
Bugfix: ctach Runtime errors (#3153)
Browse files Browse the repository at this point in the history
"RuntimeError: Disable scan failed" has been seen in a live installation
  • Loading branch information
Open Home Automation authored and robbiet480 committed Sep 3, 2016
1 parent 290ec9b commit db7f6a3
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions homeassistant/components/device_tracker/bluetooth_le_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,13 @@ def see_device(address, name, new_device=False):
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)
Expand Down

0 comments on commit db7f6a3

Please sign in to comment.