mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
using existing tuple for WaitUntil
This commit is contained in:
parent
e163b9659a
commit
0f2d5fb3a1
1 changed files with 2 additions and 3 deletions
|
@ -282,9 +282,8 @@ template<typename... Ts> class WaitUntilAction : public Action<Ts...>, public Co
|
||||||
this->var_ = std::make_tuple(x...);
|
this->var_ = std::make_tuple(x...);
|
||||||
|
|
||||||
if (this->timeout_value_.has_value()) {
|
if (this->timeout_value_.has_value()) {
|
||||||
this->set_timeout("timeout", this->timeout_value_.value(x...), [this, x = std::tuple<Ts...>(x...)]() {
|
this->set_timeout("timeout", this->timeout_value_.value(x...),
|
||||||
std::apply([this](auto &...x) { this->play_next_(x...); }, x);
|
[this]() { std::apply([this](auto &...x) { this->play_next_(x...); }, this->var_); });
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this->loop();
|
this->loop();
|
||||||
|
|
Loading…
Reference in a new issue