From 77132b2228be528318812e8f9432185e49f02571 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 20 Feb 2026 00:33:53 -0600 Subject: [PATCH 1/2] [api] Warn when clients connect with outdated API version Log a warning when a client connects with an API version older than 1.14. This alerts users that their client needs updating before the backward-compatibility code for pre-1.14 clients is removed in 2026.7.0. --- esphome/components/api/api_connection.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 5a7994a322..199284b59f 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -1534,6 +1534,13 @@ bool APIConnection::send_hello_response_(const HelloRequest &msg) { ESP_LOGV(TAG, "Hello from client: '%s' | %s | API Version %" PRIu16 ".%" PRIu16, this->helper_->get_client_name(), this->helper_->get_peername_to(peername), this->client_api_version_major_, this->client_api_version_minor_); + if (!this->client_supports_api_version(1, 14)) { + ESP_LOGW(TAG, + "Client '%s' is using API version %" PRIu16 ".%" PRIu16 + " which is outdated. Update the client to a version that supports API 1.14", + this->helper_->get_client_name(), this->client_api_version_major_, this->client_api_version_minor_); + } + HelloResponse resp; resp.api_version_major = 1; resp.api_version_minor = 14; From e0072a4b710ad0e53cad73fd5054c4e246b08c35 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 20 Feb 2026 08:37:12 -0600 Subject: [PATCH 2/2] reduce --- esphome/components/api/api_connection.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 199284b59f..5b02bee537 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -1534,11 +1534,10 @@ bool APIConnection::send_hello_response_(const HelloRequest &msg) { ESP_LOGV(TAG, "Hello from client: '%s' | %s | API Version %" PRIu16 ".%" PRIu16, this->helper_->get_client_name(), this->helper_->get_peername_to(peername), this->client_api_version_major_, this->client_api_version_minor_); + // TODO: Remove before 2026.8.0 (one version after get_object_id backward compat removal) if (!this->client_supports_api_version(1, 14)) { - ESP_LOGW(TAG, - "Client '%s' is using API version %" PRIu16 ".%" PRIu16 - " which is outdated. Update the client to a version that supports API 1.14", - this->helper_->get_client_name(), this->client_api_version_major_, this->client_api_version_minor_); + ESP_LOGW(TAG, "'%s' using outdated API %" PRIu16 ".%" PRIu16 ", update to 1.14+", this->helper_->get_client_name(), + this->client_api_version_major_, this->client_api_version_minor_); } HelloResponse resp;