diff --git a/esphome/components/api/api_pb2_service.h b/esphome/components/api/api_pb2_service.h index c3f4a101b0..b2be314aaf 100644 --- a/esphome/components/api/api_pb2_service.h +++ b/esphome/components/api/api_pb2_service.h @@ -17,7 +17,6 @@ class APIServerConnectionBase : public ProtoService { public: #endif - public: template bool send_message(const T &msg) { #ifdef HAS_PROTO_MESSAGE_DUMP this->log_send_message_(T::message_name(), msg.dump()); diff --git a/script/api_protobuf/api_protobuf.py b/script/api_protobuf/api_protobuf.py index 4d2c580ab1..bd1be66649 100755 --- a/script/api_protobuf/api_protobuf.py +++ b/script/api_protobuf/api_protobuf.py @@ -1352,8 +1352,6 @@ def main() -> None: hpp += " public:\n" hpp += "#endif\n\n" - hpp += " public:\n" - # Add generic send_message method hpp += " template\n" hpp += " bool send_message(const T &msg) {\n"