From d72b3ccdfb31e3ebac8286cefad5d1b509efb802 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 19:52:53 -0500 Subject: [PATCH] cleanups --- components/ratgdo/light/ratgdo_light_output.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/ratgdo/light/ratgdo_light_output.cpp b/components/ratgdo/light/ratgdo_light_output.cpp index b73743b..05b1858 100644 --- a/components/ratgdo/light/ratgdo_light_output.cpp +++ b/components/ratgdo/light/ratgdo_light_output.cpp @@ -17,9 +17,8 @@ namespace ratgdo { { ESP_LOGD(TAG, "on_light_state: %d", state); if (this->light_state_) { - auto call = this->light_state_->make_call(); - call.set_state(state == LightState::LIGHT_STATE_ON); - call.perform(); + this->light_state_->current_values_as_binary()->set_value(state == LightState::LIGHT_STATE_ON); + this->light_state_->publish_state(); } } LightTraits RATGDOLightOutput::get_traits()