diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index ddf2853438b..f40f62ea9ee 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -329,12 +329,12 @@ class APIConnection final : public APIServerConnectionBase { #endif // Encode thunk — converts void* back to concrete type for direct encode() call - template static void encode_msg_(const void *msg, ProtoWriteBuffer &buffer) { + template static void encode_msg(const void *msg, ProtoWriteBuffer &buffer) { static_cast(msg)->encode(buffer); } // Size thunk — converts void* back to concrete type for direct calculate_size() call - template static uint32_t calc_size_(const void *msg) { + template static uint32_t calc_size(const void *msg) { return static_cast(msg)->calculate_size(); }