Update ratgdo.cpp
This commit is contained in:
parent
60881341d8
commit
21d490cb77
|
@ -460,16 +460,12 @@ namespace ratgdo {
|
|||
return;
|
||||
}
|
||||
|
||||
if (this->obstruction_sensor_detected_) {
|
||||
this->door_action(DoorAction::CLOSE);
|
||||
} else {
|
||||
if (*this->door_state == DoorState::OPEN || *this->door_state == DoorState::STOPPED) {
|
||||
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) {
|
||||
// query state in case we don't get a status message
|
||||
|
|
Loading…
Reference in New Issue