diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index cd48835..b6ad370 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -240,6 +240,9 @@ namespace ratgdo { } } else if (cmd == Command::MOTION) { this->motion_state = MotionState::DETECTED; + this->set_timeout("clear_motion", 3000, [=] { + this->motion_state = MotionState::CLEAR; + }); if (*this->light_state == LightState::OFF) { this->send_command(Command::GET_STATUS); }