From 01b24a7b6986fd6c6e162092adadbaaefe12d305 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 25 Jul 2025 23:11:11 -1000 Subject: [PATCH] fix merge conflict --- esphome/components/api/api_connection.cpp | 2 ++ esphome/components/api/api_connection.h | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/esphome/components/api/api_connection.cpp b/esphome/components/api/api_connection.cpp index 09903b5093..4fb229aa9b 100644 --- a/esphome/components/api/api_connection.cpp +++ b/esphome/components/api/api_connection.cpp @@ -1826,6 +1826,7 @@ uint16_t APIConnection::try_send_ping_request(EntityBase *entity, APIConnection return encode_message_to_buffer(req, PingRequest::MESSAGE_TYPE, conn, remaining_size, is_single); } +#ifdef USE_API_HOMEASSISTANT_STATES void APIConnection::process_state_subscriptions_() { const auto &subs = this->parent_->get_state_subs(); if (this->state_subs_at_ >= static_cast(subs.size())) { @@ -1845,6 +1846,7 @@ void APIConnection::process_state_subscriptions_() { this->state_subs_at_++; } } +#endif // USE_API_HOMEASSISTANT_STATES } // namespace esphome::api #endif diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index 381543caa7..6ad18d2b15 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -294,8 +294,9 @@ class APIConnection : public APIServerConnection { // Helper function to handle authentication completion void complete_authentication_(); - // Process state subscriptions efficiently +#ifdef USE_API_HOMEASSISTANT_STATES void process_state_subscriptions_(); +#endif // Non-template helper to encode any ProtoMessage static uint16_t encode_message_to_buffer(ProtoMessage &msg, uint8_t message_type, APIConnection *conn,