1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-14 07:43:48 +01:00

fix ifdefs

This commit is contained in:
J. Nick Koston
2025-10-07 09:53:41 -05:00
committed by Jesse Hills
parent 49b271747d
commit 1f557b46b3

View File

@@ -152,6 +152,7 @@ template<typename... Ts> class HomeAssistantServiceCallAction : public Action<Ts
static uint32_t call_id_counter = 1; static uint32_t call_id_counter = 1;
uint32_t call_id = call_id_counter++; uint32_t call_id = call_id_counter++;
resp.call_id = call_id; resp.call_id = call_id;
#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES_JSON
if (this->flags_.wants_response) { if (this->flags_.wants_response) {
resp.wants_response = true; resp.wants_response = true;
// Set response template if provided // Set response template if provided
@@ -160,6 +161,7 @@ template<typename... Ts> class HomeAssistantServiceCallAction : public Action<Ts
resp.response_template = response_template_value; resp.response_template = response_template_value;
} }
} }
#endif
auto captured_args = std::make_tuple(x...); auto captured_args = std::make_tuple(x...);
this->parent_->register_action_response_callback( this->parent_->register_action_response_callback(