mirror of
https://github.com/esphome/esphome.git
synced 2025-02-18 01:03: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 {
|
} else {
|
||||||
auto op = pos < this->position ? COVER_OPERATION_CLOSING : COVER_OPERATION_OPENING;
|
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->target_position_ = pos;
|
||||||
this->start_direction_(op);
|
this->start_direction_(op);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue