1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-03 11:52:20 +01:00

Revert "preen"

This reverts commit 0207444765.
This commit is contained in:
J. Nick Koston
2025-08-13 23:04:38 -05:00
parent 0207444765
commit d83ed9ebe1

View File

@@ -307,7 +307,8 @@ uint16_t APIConnection::encode_message_to_buffer(ProtoMessage &msg, uint8_t mess
}
// Encode directly into buffer
msg.encode({&shared_buf});
ProtoWriteBuffer buffer{&shared_buf};
msg.encode(buffer);
// Calculate actual encoded size (not including header that was already added)
size_t actual_payload_size = shared_buf.size() - size_before_encode;