mirror of
https://github.com/esphome/esphome.git
synced 2024-11-25 08:28:12 +01:00
time_based_cover.cpp with manual control fix (#6719)
This commit is contained in:
parent
dd81c83686
commit
a23d1631e1
1 changed files with 3 additions and 0 deletions
|
@ -96,6 +96,9 @@ void TimeBasedCover::control(const CoverCall &call) {
|
|||
}
|
||||
} else {
|
||||
auto op = pos < this->position ? COVER_OPERATION_CLOSING : COVER_OPERATION_OPENING;
|
||||
if (this->manual_control_ && (pos == COVER_OPEN || pos == COVER_CLOSED)) {
|
||||
this->position = pos == COVER_CLOSED ? COVER_OPEN : COVER_CLOSED;
|
||||
}
|
||||
this->target_position_ = pos;
|
||||
this->start_direction_(op);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue