From 2f078d4edfc8c56403b0b930b74ba421501e3763 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Tue, 13 May 2025 23:48:48 -0500 Subject: [PATCH] no need to loop twice --- esphome/components/api/api_connection.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index baeae98695..05fc223a06 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -153,7 +153,7 @@ void APIConnection::loop() { return; } - if (this->try_to_clear_buffer(true)) { + if (this->helper_->can_write_without_blocking()) { this->deferred_message_queue_.process_queue(); }