1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 20:32:21 +01:00

Conditionally compile API user services to save 4.3KB flash (follow-up to #9262) (#9451)

This commit is contained in:
J. Nick Koston
2025-07-11 19:08:03 -10:00
committed by GitHub
parent 0138ef36cf
commit dd5ba5a90c
23 changed files with 345 additions and 52 deletions

View File

@@ -2051,6 +2051,7 @@ void GetTimeResponse::encode(ProtoWriteBuffer buffer) const { buffer.encode_fixe
void GetTimeResponse::calculate_size(uint32_t &total_size) const {
ProtoSize::add_fixed_field<4>(total_size, 1, this->epoch_seconds != 0);
}
#ifdef USE_API_SERVICES
bool ListEntitiesServicesArgument::decode_varint(uint32_t field_id, ProtoVarInt value) {
switch (field_id) {
case 2: {
@@ -2245,6 +2246,7 @@ void ExecuteServiceRequest::calculate_size(uint32_t &total_size) const {
ProtoSize::add_fixed_field<4>(total_size, 1, this->key != 0);
ProtoSize::add_repeated_message(total_size, 1, this->args);
}
#endif
#ifdef USE_CAMERA
bool ListEntitiesCameraResponse::decode_varint(uint32_t field_id, ProtoVarInt value) {
switch (field_id) {