mirror of
https://github.com/esphome/esphome.git
synced 2025-09-04 20:32:21 +01:00
[api] Add conditional compilation for Home Assistant state subscriptions (#9898)
This commit is contained in:
@@ -871,6 +871,7 @@ void HomeassistantServiceResponse::calculate_size(uint32_t &total_size) const {
|
||||
ProtoSize::add_repeated_message(total_size, 1, this->variables);
|
||||
ProtoSize::add_bool_field(total_size, 1, this->is_event);
|
||||
}
|
||||
#ifdef USE_API_HOMEASSISTANT_STATES
|
||||
void SubscribeHomeAssistantStateResponse::encode(ProtoWriteBuffer buffer) const {
|
||||
buffer.encode_string(1, this->entity_id_ref_);
|
||||
buffer.encode_string(2, this->attribute_ref_);
|
||||
@@ -897,6 +898,7 @@ bool HomeAssistantStateResponse::decode_length(uint32_t field_id, ProtoLengthDel
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
bool GetTimeResponse::decode_32bit(uint32_t field_id, Proto32Bit value) {
|
||||
switch (field_id) {
|
||||
case 1:
|
||||
|
Reference in New Issue
Block a user