From a23d1631e199ac274a1f11d5fbe16ee12fe5b65c Mon Sep 17 00:00:00 2001 From: Jorge-Crespo-Celdran <86021690+Jorge-Crespo-Celdran@users.noreply.github.com> Date: Mon, 13 May 2024 06:04:06 +0200 Subject: [PATCH] time_based_cover.cpp with manual control fix (#6719) --- esphome/components/time_based/time_based_cover.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/esphome/components/time_based/time_based_cover.cpp b/esphome/components/time_based/time_based_cover.cpp index 50376224a9..e1936d5ee1 100644 --- a/esphome/components/time_based/time_based_cover.cpp +++ b/esphome/components/time_based/time_based_cover.cpp @@ -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); }