diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index edc0d27..0327658 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -460,10 +460,10 @@ namespace ratgdo { return; } - if(this->obstruction_sensor_detected_){ - this->door_action(DoorAction::CLOSE); - }else if(*this->door_state == DoorState::OPEN){ - ESP_LOGD(TAG, "No obstruction sensors detected. Close using TOGGLE."); + if (this->obstruction_sensor_detected_) { + this->door_action(DoorAction::CLOSE); + } else if (*this->door_state == DoorState::OPEN) { + ESP_LOGD(TAG, "No obstruction sensors detected. Close using TOGGLE."); this->door_action(DoorAction::TOGGLE); }