diff --git a/api/ble.py b/api/ble.py index c797867..4ce96bd 100644 --- a/api/ble.py +++ b/api/ble.py @@ -137,7 +137,10 @@ def sensor_data_query(mac_list: List[str]) -> List[dict]: except Exception as e: log.error(f"Error reading BLE data - {e}") this_result = None - if "org.freedesktop.DBus.Error.AccessDenied" in e: + if "org.freedesktop.DBus.Error.AccessDenied" in str(e): + reset_adapter() + return result + if "argument of type 'BleakDBusError' is not iterable" in str(e): reset_adapter() return result if this_result: