From 759b4eb25588a4949346b61a19affa676523e2a2 Mon Sep 17 00:00:00 2001 From: gnxlxnxx Date: Wed, 24 Jan 2024 22:45:14 +0100 Subject: [PATCH] ............................ --- components/custom_monochromatic/monochromatic_light_output.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/custom_monochromatic/monochromatic_light_output.h b/components/custom_monochromatic/monochromatic_light_output.h index e6c72ee..87ed996 100644 --- a/components/custom_monochromatic/monochromatic_light_output.h +++ b/components/custom_monochromatic/monochromatic_light_output.h @@ -27,9 +27,9 @@ public: return traits; } void write_state(light::LightState *state) override { + this->light_state_ = state; + state->current_values_as_brightness(&(this->bright_)); if (this->state_ == On) { - this->light_state_ = state; - state->current_values_as_brightness(&(this->bright_)); this->upper_->set_level(this->bright_); this->lower_->set_level(this->bright_); }