mirror of
https://github.com/esphome/esphome.git
synced 2026-02-18 23:45:40 -07:00
cf691a43b296942730bcca356d2d48e4d9dd99e2
When the load is switched off and current drops below the chip's measurable threshold (~50mA), the CSE7766 sets have_power=false indicating no valid power measurement. The code was not publishing any value in this case, leaving the power sensor stuck at its last reading (e.g., 200W) for 10-20 seconds. This regression was introduced in 2024.2.0 when PR #6180 refactored the code from an accumulator-based design to direct publishing. The original code handled this case by incrementing power_counts_ when have_voltage && !have_power, effectively publishing 0W. Fixes esphome/esphome#13613
Description
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems.
Readme
Multiple Licenses
362 MiB
Languages
C++
64.2%
Python
35.5%
C
0.2%
