diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index e27ce9386c..f8b99c247e 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -153,7 +153,9 @@ void APIConnection::loop() { return; } - this->deferred_message_queue_.process_queue(); + if (this->can_write_without_blocking()) { + this->deferred_message_queue_.process_queue(); + } if (!this->list_entities_iterator_.completed()) this->list_entities_iterator_.advance();