diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 8b4f86e..47c13e9 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -85,14 +85,14 @@ namespace ratgdo { void RATGDOComponent::received(const DoorState door_state) { - ESP_LOGD(TAG, "Door state=%s", DoorState_to_string(door_state)); - auto prev_door_state = *this->door_state; if (prev_door_state == door_state) { return; } + ESP_LOGD(TAG, "Door state=%s", DoorState_to_string(door_state)); + // opening duration calibration if (*this->opening_duration == 0) { if (door_state == DoorState::OPENING && prev_door_state == DoorState::CLOSED) {