diff --git a/components/ratgdo/ratgdo.cpp b/components/ratgdo/ratgdo.cpp index 88983d7..cc4d96b 100644 --- a/components/ratgdo/ratgdo.cpp +++ b/components/ratgdo/ratgdo.cpp @@ -485,11 +485,11 @@ namespace ratgdo { void RATGDOComponent::sendDoorStatus() { DoorState val = static_cast(this->store_.doorState); - ESP_LOGD(TAG, "Door state: %s", door_state_to_string(val); - this->status_door_pin_->digital_write(this->store_.doorState == 1); + ESP_LOGD(TAG, "Door state: %s", door_state_to_string(val)); for (auto *child : this->children_) { child->on_door_state(val); } + this->status_door_pin_->digital_write(this->store_.doorState == 1); } void RATGDOComponent::sendLightStatus()