diff --git a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp index e4b1c80619..895819909a 100644 --- a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp +++ b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp @@ -80,7 +80,6 @@ void BluetoothConnection::send_service_for_discovery_() { // Process up to 3 services in this iteration uint8_t services_to_process = std::min(MAX_SERVICES_PER_BATCH, static_cast(this->service_count_ - this->send_service_)); - uint8_t services_processed = 0; resp.services.reserve(services_to_process); for (int service_idx = 0; service_idx < services_to_process; service_idx++) { @@ -116,7 +115,6 @@ void BluetoothConnection::send_service_for_discovery_() { if (total_char_count == 0) { // No characteristics, continue to next service - services_processed++; continue; } @@ -190,8 +188,6 @@ void BluetoothConnection::send_service_for_discovery_() { desc_offset++; } } - - services_processed++; } // Send the message with 1-3 services