Toggle for close only when door is open
This commit is contained in:
parent
956fd05cf9
commit
93abfa0b54
|
@ -462,7 +462,8 @@ namespace ratgdo {
|
||||||
|
|
||||||
if(this->obstruction_sensor_detected_){
|
if(this->obstruction_sensor_detected_){
|
||||||
this->door_action(DoorAction::CLOSE);
|
this->door_action(DoorAction::CLOSE);
|
||||||
}else{
|
}else if(*this->door_state == DoorState::OPEN){
|
||||||
|
ESP_LOGD(TAG, "No obstruction sensors detected. Close using TOGGLE.");
|
||||||
this->door_action(DoorAction::TOGGLE);
|
this->door_action(DoorAction::TOGGLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue