From 117cffd2b0db96f466ddec2f0ff79108001fd55f Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 14 Aug 2025 17:51:15 -0500 Subject: [PATCH] [bluetooth_proxy] Remove redundant connection type check after V1 removal (#10208) --- .../components/bluetooth_proxy/bluetooth_connection.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp index 347f60c28f..d2cbdeb984 100644 --- a/esphome/components/bluetooth_proxy/bluetooth_connection.cpp +++ b/esphome/components/bluetooth_proxy/bluetooth_connection.cpp @@ -133,7 +133,7 @@ void BluetoothConnection::loop() { // Check if we should disable the loop // - For V3_WITH_CACHE: Services are never sent, disable after INIT state - // - For other connections: Disable only after service discovery is complete + // - For V3_WITHOUT_CACHE: Disable only after service discovery is complete // (send_service_ == DONE_SENDING_SERVICES, which is only set after services are sent) if (this->state_ != espbt::ClientState::INIT && (this->connection_type_ == espbt::ConnectionType::V3_WITH_CACHE || this->send_service_ == DONE_SENDING_SERVICES)) { @@ -160,10 +160,7 @@ void BluetoothConnection::send_service_for_discovery_() { if (this->send_service_ >= this->service_count_) { this->send_service_ = DONE_SENDING_SERVICES; this->proxy_->send_gatt_services_done(this->address_); - if (this->connection_type_ == espbt::ConnectionType::V3_WITH_CACHE || - this->connection_type_ == espbt::ConnectionType::V3_WITHOUT_CACHE) { - this->release_services(); - } + this->release_services(); return; }