From 8faecc7269e5815b312a14807f690c507ebb8fb3 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 21 Aug 2026 18:37:13 -0500 Subject: [PATCH] Clear the scan-end skip when a connect stops the scan --- esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp b/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp index 363dc5a949..e5730a70ea 100644 --- a/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp +++ b/esphome/components/esp32_ble_tracker/esp32_ble_tracker.cpp @@ -566,6 +566,8 @@ void ESP32BLETracker::try_promote_discovered_clients_() { if (this->scanner_state_ == ScannerState::RUNNING) { ESP_LOGD(TAG, "Stopping scan to make connection"); + // A connect ends the scan period a window-change restart was continuing. + this->skip_next_scan_end_ = false; this->stop_scan_(); // Don't wait for scan stop complete - promote immediately. // This is safe because ESP-IDF processes BLE commands sequentially through its internal mailbox queue.