diff --git a/esphome/components/esp32_ble/ble.cpp b/esphome/components/esp32_ble/ble.cpp index 3ff2577bd5..a3bd1f82e5 100644 --- a/esphome/components/esp32_ble/ble.cpp +++ b/esphome/components/esp32_ble/ble.cpp @@ -370,7 +370,7 @@ void ESP32BLE::loop() { template void enqueue_ble_event(Args... args) { // Check if buffer is full before allocating - if (global_ble->ble_events_.size() >= (SCAN_RESULT_BUFFER_SIZE * 2 - 1)) { + if (global_ble->ble_events_.size() >= MAX_BLE_QUEUE_SIZE) { // Buffer is full, push will fail and increment dropped count internally return; }