mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
fix apparent power sometimes lower than active power
This commit is contained in:
parent
7d95472a4c
commit
80df581813
1 changed files with 1 additions and 1 deletions
|
@ -174,7 +174,7 @@ void CSE7766Component::parse_data_() {
|
|||
}
|
||||
|
||||
if (have_voltage && have_current) {
|
||||
const float apparent_power = voltage * current;
|
||||
const float apparent_power = max(voltage * current, power);
|
||||
if (this->apparent_power_sensor_ != nullptr) {
|
||||
this->apparent_power_sensor_->publish_state(apparent_power);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue