diff --git a/components/ratgdo/light/ratgdo_light_output.cpp b/components/ratgdo/light/ratgdo_light_output.cpp index 5a9f58a..52a80d4 100644 --- a/components/ratgdo/light/ratgdo_light_output.cpp +++ b/components/ratgdo/light/ratgdo_light_output.cpp @@ -16,9 +16,10 @@ namespace ratgdo { void RATGDOLightOutput::on_light_state(LightState state) { ESP_LOGD(TAG, "on_light_state: %d", state); + this->_is_on = state == LightState::LIGHT_STATE_ON; if (this->light_state_) { auto call = this->light_state_->make_call(); - call.set_state(state == LightState::LIGHT_STATE_ON); + call.set_state(this->_is_on); call.perform(); } }