From 7692aacc2df4e53d711a198ed274287f31061cbb Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 30 Jul 2025 14:51:35 -1000 Subject: [PATCH] [bluetooth_proxy] Batch BLE service discovery messages for 67% reduction in API traffic --- esphome/components/bluetooth_proxy/bluetooth_connection.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp index ac31e74124..e4b1c80619 100644 --- a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp +++ b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp @@ -93,11 +93,7 @@ void BluetoothConnection::send_service_for_discovery_() { ESP_LOGE(TAG, "[%d] [%s] esp_ble_gattc_get_service %s, status=%d, service_count=%d, offset=%d", this->connection_index_, this->address_str().c_str(), service_status != ESP_GATT_OK ? "error" : "missing", service_status, service_count, this->send_service_); - // If first service fails, return. If second fails, send what we have. - if (services_processed == 0) { - return; - } - break; + return; } this->send_service_++;