From 0f2d5fb3a1553d76f172ab163521b0ae1a92d80c Mon Sep 17 00:00:00 2001 From: Sergey Dudanov Date: Mon, 21 Aug 2023 00:12:47 +0400 Subject: [PATCH] using existing tuple for WaitUntil --- esphome/core/base_automation.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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();