From 6ea1da7620ca8645a45b559e91b79c6ba9c24fd3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sun, 30 Oct 2022 19:39:01 -0500 Subject: [PATCH] Add a mapping for ESP_GATT_ERROR (#296) --- aioesphomeapi/ble_defs.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aioesphomeapi/ble_defs.py b/aioesphomeapi/ble_defs.py index 6805e9d..5afdf2a 100644 --- a/aioesphomeapi/ble_defs.py +++ b/aioesphomeapi/ble_defs.py @@ -13,6 +13,7 @@ class BLEConnectionError(IntEnum): ESP_GATT_CONN_TERMINATE_LOCAL_HOST = 0x16 ESP_GATT_CONN_FAIL_ESTABLISH = 0x3E ESP_GATT_CONN_LMP_TIMEOUT = 0x22 + ESP_GATT_ERROR = 0x85 ESP_GATT_CONN_CONN_CANCEL = 0x0100 ESP_GATT_CONN_NONE = 0x0101 @@ -25,6 +26,7 @@ ESP_CONNECTION_ERROR_DESCRIPTION = { BLEConnectionError.ESP_GATT_CONN_TERMINATE_LOCAL_HOST: "Connection terminated by local host", BLEConnectionError.ESP_GATT_CONN_FAIL_ESTABLISH: "Connection failed to establish", BLEConnectionError.ESP_GATT_CONN_LMP_TIMEOUT: "Connection failed due to LMP response timeout", + BLEConnectionError.ESP_GATT_ERROR: "Connection failed due to GATT operation error", BLEConnectionError.ESP_GATT_CONN_CONN_CANCEL: "Connection cancelled", BLEConnectionError.ESP_GATT_CONN_NONE: "No connection to cancel", }