From 931aceef652952945c3eb3564f428103b56f8808 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Wed, 7 Jun 2023 19:25:44 -0500 Subject: [PATCH] tidy up --- components/ratgdo/light/ratgdo_light_output.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/ratgdo/light/ratgdo_light_output.cpp b/components/ratgdo/light/ratgdo_light_output.cpp index fab0a0b..5a9f58a 100644 --- a/components/ratgdo/light/ratgdo_light_output.cpp +++ b/components/ratgdo/light/ratgdo_light_output.cpp @@ -33,11 +33,14 @@ namespace ratgdo { { bool binary; state->current_values_as_binary(&binary); + if (binary == this->_is_on) + return; if (binary) { this->parent_->lightOn(); } else { this->parent_->lightOff(); } + this->_is_on = binary; } } // namespace ratgdo