mirror of
https://github.com/esphome/esphome.git
synced 2025-10-16 15:37:51 +02:00
Merge branch 'fixed_vector_HomeassistantServiceMap' into memory_api
This commit is contained in:
commit
1479f48636
@ -123,7 +123,7 @@ template<typename... Ts> class HomeAssistantServiceCallAction : public Action<Ts
|
||||
#endif // USE_API_HOMEASSISTANT_ACTION_RESPONSES
|
||||
|
||||
template<typename VectorType, typename SourceType>
|
||||
static void populate_service_map_(VectorType &dest, SourceType &source, Ts... x) {
|
||||
static void populate_service_map(VectorType &dest, SourceType &source, Ts... x) {
|
||||
dest.init(source.size());
|
||||
for (auto &it : source) {
|
||||
auto &kv = dest.emplace_back();
|
||||
@ -137,9 +137,9 @@ template<typename... Ts> class HomeAssistantServiceCallAction : public Action<Ts
|
||||
std::string service_value = this->service_.value(x...);
|
||||
resp.set_service(StringRef(service_value));
|
||||
resp.is_event = this->flags_.is_event;
|
||||
populate_service_map_(resp.data, this->data_, x...);
|
||||
populate_service_map_(resp.data_template, this->data_template_, x...);
|
||||
populate_service_map_(resp.variables, this->variables_, x...);
|
||||
populate_service_map(resp.data, this->data_, x...);
|
||||
populate_service_map(resp.data_template, this->data_template_, x...);
|
||||
populate_service_map(resp.variables, this->variables_, x...);
|
||||
|
||||
#ifdef USE_API_HOMEASSISTANT_ACTION_RESPONSES
|
||||
if (this->flags_.wants_status) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user