From 9a9b91b180374eda0082d76ac72ba1ceb914c439 Mon Sep 17 00:00:00 2001 From: Jannik <33796278+SuperPlusUser@users.noreply.github.com> Date: Thu, 1 May 2025 03:12:51 +0200 Subject: [PATCH] Fix HLW8012 sensor not returning values if change_mode_every is set to never (#8456) --- esphome/components/hlw8012/hlw8012.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/hlw8012/hlw8012.cpp b/esphome/components/hlw8012/hlw8012.cpp index 14e83f60e1..1efc57ab66 100644 --- a/esphome/components/hlw8012/hlw8012.cpp +++ b/esphome/components/hlw8012/hlw8012.cpp @@ -69,7 +69,7 @@ void HLW8012Component::update() { float power = cf_hz * this->power_multiplier_; - if (this->change_mode_at_ != 0) { + if (this->change_mode_at_ != 0 || this->change_mode_every_ == 0) { // Only read cf1 after one cycle. Apparently it's quite unstable after being changed. if (this->current_mode_) { float current = cf1_hz * this->current_multiplier_;