From 858ea16f91a80c5bd949a2c16c3be262516e23de Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Fri, 6 Jun 2025 12:41:25 +0100 Subject: [PATCH] 8266 --- esphome/components/api/api_connection.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/esphome/components/api/api_connection.h b/esphome/components/api/api_connection.h index ee230a0d06..a6da2fbeeb 100644 --- a/esphome/components/api/api_connection.h +++ b/esphome/components/api/api_connection.h @@ -487,8 +487,13 @@ class APIConnection : public APIServerConnection { uint32_t timestamp; // When this update was queued uint16_t message_type; // Message type for overhead calculation + // Default constructor + BatchItem() : entity(nullptr), timestamp(0), message_type(0) {} + // Constructor for creating BatchItem - BatchItem(EntityBase *entity, MessageCreator creator, uint32_t timestamp, uint16_t message_type) + BatchItem(EntityBase *entity, + std::function creator, + uint32_t timestamp, uint16_t message_type) : entity(entity), creator(std::move(creator)), timestamp(timestamp), message_type(message_type) {} };