From 197fc7902f1285612ffece2cde04e386b58c59de Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 19:40:34 -0500 Subject: [PATCH] cleanups --- components/ratgdo/light/ratgdo_light_output.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/ratgdo/light/ratgdo_light_output.cpp b/components/ratgdo/light/ratgdo_light_output.cpp index c92a3a5..aa9bb46 100644 --- a/components/ratgdo/light/ratgdo_light_output.cpp +++ b/components/ratgdo/light/ratgdo_light_output.cpp @@ -32,9 +32,9 @@ namespace ratgdo { void RATGDOLightOutput::write_state(light::LightState* state) { bool binary; - bool current_state = state == LightState::LIGHT_STATE_ON; + bool currentState = this->parent_->lightsState == esphome::ratgdo::LightState::LIGHT_STATE_ON; state->current_values_as_binary(&binary); - if (binary == current_state) + if (binary == currentState) return; if (binary) { ESP_LOGD(TAG, "output call lightOn");