From dbf6a6b839bac442b87c0898bd9349efc0723338 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 19:26:42 -0500 Subject: [PATCH] tidy up --- components/ratgdo/light/ratgdo_light_output.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); } }