diff --git a/esphome/components/api/proto.h b/esphome/components/api/proto.h index d8ac7061e1..ee2fd8be7f 100644 --- a/esphome/components/api/proto.h +++ b/esphome/components/api/proto.h @@ -161,7 +161,11 @@ class ProtoVarInt { #endif protected: +#ifdef USE_API_VARINT64 uint64_t value_; +#else + uint32_t value_; +#endif }; // Forward declarations for decode_to_message, encode_message and encode_packed_sint32