mirror of
https://github.com/esphome/esphome.git
synced 2025-10-17 17:23:45 +01:00
Merge branch 'fixed_vector_HomeassistantServiceMap' into integration
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user