mirror of
https://github.com/esphome/esphome.git
synced 2025-07-29 06:36:45 +00:00
Fix HLW8012 sensor not returning values if change_mode_every is set to never (#8456)
This commit is contained in:
parent
82c8614315
commit
0c0fe81814
@ -69,7 +69,7 @@ void HLW8012Component::update() {
|
|||||||
|
|
||||||
float power = cf_hz * this->power_multiplier_;
|
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.
|
// Only read cf1 after one cycle. Apparently it's quite unstable after being changed.
|
||||||
if (this->current_mode_) {
|
if (this->current_mode_) {
|
||||||
float current = cf1_hz * this->current_multiplier_;
|
float current = cf1_hz * this->current_multiplier_;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user