diff --git a/esphome/core/base_automation.h b/esphome/core/base_automation.h index 84192c647f..fdf4241323 100644 --- a/esphome/core/base_automation.h +++ b/esphome/core/base_automation.h @@ -282,9 +282,8 @@ template class WaitUntilAction : public Action, public Co this->var_ = std::make_tuple(x...); if (this->timeout_value_.has_value()) { - this->set_timeout("timeout", this->timeout_value_.value(x...), [this, x = std::tuple(x...)]() { - std::apply([this](auto &...x) { this->play_next_(x...); }, x); - }); + this->set_timeout("timeout", this->timeout_value_.value(x...), + [this]() { std::apply([this](auto &...x) { this->play_next_(x...); }, this->var_); }); } this->loop();