diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 26c9dbe..88983d7 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -473,6 +473,7 @@ namespace ratgdo { if (this->store_.motionState == MotionState::MOTION_STATE_DETECTED) { sendMotionStatus(); this->store_.motionState = MotionState::MOTION_STATE_CLEAR; + sendMotionStatus(); } previousDoorState = this->store_.doorState; @@ -516,10 +517,6 @@ namespace ratgdo { for (auto* child : this->children_) { child->on_motion_state(val); } - this->store_.motionState = MotionState::MOTION_STATE_CLEAR; // reset motion state - for (auto* child : this->children_) { - child->on_motion_state(MotionState::MOTION_STATE_CLEAR); - } } void RATGDOComponent::sendObstructionStatus()