1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 11:22:24 +01:00

time_based_cover.cpp with manual control fix (#6719)

This commit is contained in:
Jorge-Crespo-Celdran
2024-05-13 06:04:06 +02:00
committed by GitHub
parent dd81c83686
commit a23d1631e1

View File

@@ -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);
}