From 6e345c5f23e7fa04ed74e9693e38c100fd611ce8 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Sat, 26 Jul 2025 15:03:36 -1000 Subject: [PATCH] dry --- esphome/components/api/proto.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/esphome/components/api/proto.h b/esphome/components/api/proto.h index bfca80960f..3d66859bd3 100644 --- a/esphome/components/api/proto.h +++ b/esphome/components/api/proto.h @@ -689,8 +689,7 @@ class ProtoSize { */ inline void add_message_field(uint32_t field_id_size, uint32_t nested_size) { if (nested_size != 0) { - // Field ID + length varint + nested message content - total_size_ += field_id_size + varint(nested_size) + nested_size; + add_message_field_force(field_id_size, nested_size); } }