diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index 9eb55e1ece..a9f456c745 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -313,6 +313,13 @@ class APIConnection : public APIServerConnection { std::string get_client_combined_info() const { return this->client_combined_info_; } + // Info about an encoded message + struct MessageInfo { + uint16_t type; + uint16_t size; + bool encoded; + }; + protected: // Helper function to fill common entity fields template static void fill_entity_info_base_(esphome::EntityBase *entity, ResponseT &response) { @@ -471,13 +478,6 @@ class APIConnection : public APIServerConnection { ListEntitiesIterator list_entities_iterator_; int state_subs_at_ = -1; - // Info about an encoded message - struct MessageInfo { - uint16_t type; - uint16_t size; - bool encoded; - }; - // Function type that encodes a message directly to buffer using MessageCreator = std::function;