This commit is contained in:
Beat 2024-12-18 11:32:46 -10:00 committed by GitHub
commit 7b1f522769
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -460,11 +460,11 @@ namespace ratgdo {
return;
}
if (this->obstruction_sensor_detected_) {
this->door_action(DoorAction::CLOSE);
} else if (*this->door_state == DoorState::OPEN) {
if (!this->obstruction_sensor_detected_ && (*this->door_state == DoorState::OPEN || *this->door_state == DoorState::STOPPED)) {
ESP_LOGD(TAG, "No obstruction sensors detected. Close using TOGGLE.");
this->door_action(DoorAction::TOGGLE);
} else {
this->door_action(DoorAction::CLOSE);
}
if (*this->closing_duration > 0) {