mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
Fix ForCondition time duration check (#610)
According documentation ForCondition should evaluate to true if a nested condition is true for at least the specified time duration and not the less.
This commit is contained in:
parent
970838ed09
commit
0d36e66125
1 changed files with 1 additions and 1 deletions
|
@ -73,7 +73,7 @@ template<typename... Ts> class ForCondition : public Condition<Ts...>, public Co
|
|||
bool check(Ts... x) override {
|
||||
if (!this->check_internal())
|
||||
return false;
|
||||
return millis() - this->last_inactive_ < this->time_.value(x...);
|
||||
return millis() - this->last_inactive_ >= this->time_.value(x...);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
Loading…
Reference in a new issue