From 93abfa0b540f4c2f7b6e77ae59f6e3466be3055f Mon Sep 17 00:00:00 2001 From: Paul Wieland Date: Tue, 2 Jul 2024 10:21:35 -0400 Subject: [PATCH] Toggle for close only when door is open --- components/ratgdo/ratgdo.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 1cd837f..ae7b08f 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -461,8 +461,9 @@ namespace ratgdo { } if(this->obstruction_sensor_detected_){ - this->door_action(DoorAction::CLOSE); - }else{ + 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); }