From 7719d07548c7cc52b14dd948a3da7258922166eb Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 2 Mar 2026 13:11:15 -1000 Subject: [PATCH] [esp32_ble_client] Log when DISCONNECT_EVT arrives after CLOSE_EVT --- esphome/components/esp32_ble_client/ble_client_base.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/esphome/components/esp32_ble_client/ble_client_base.cpp b/esphome/components/esp32_ble_client/ble_client_base.cpp index 24543a6cb1..7eb172329a 100644 --- a/esphome/components/esp32_ble_client/ble_client_base.cpp +++ b/esphome/components/esp32_ble_client/ble_client_base.cpp @@ -377,6 +377,7 @@ bool BLEClientBase::gattc_event_handler(esp_gattc_cb_event_t event, esp_gatt_if_ // DISCONNECT_EVT. If CLOSE_EVT already transitioned us to IDLE, don't go // backwards to DISCONNECTING — the connection is already fully cleaned up. if (this->state() == espbt::ClientState::IDLE) { + this->log_event_("DISCONNECT_EVT after CLOSE_EVT, already IDLE"); break; } // For passive disconnects (remote device disconnected or link lost),