Revert "Loadpoint: publish charge voltages also with phase switching (#21510)"

This reverts commit 94b1145e39.
This commit is contained in:
andig 2025-06-03 11:11:54 +02:00
parent 8ec34b15ed
commit 53e19a4efc

View file

@ -1559,6 +1559,10 @@ func (lp *Loadpoint) phasesFromChargeCurrents() {
// updateChargeVoltages uses PhaseVoltages interface to count phases with nominal grid voltage
func (lp *Loadpoint) updateChargeVoltages() {
if lp.hasPhaseSwitching() {
return // we don't need the voltages
}
phaseMeter, ok := lp.chargeMeter.(api.PhaseVoltages)
if !ok {
return // don't guess
@ -1574,10 +1578,6 @@ func (lp *Loadpoint) updateChargeVoltages() {
lp.log.DEBUG.Printf("charge voltages: %.3gV", chargeVoltages)
lp.publish(keys.ChargeVoltages, chargeVoltages)
if lp.hasPhaseSwitching() {
return // we don't need the voltages
}
a1, a2, a3 := u1 >= minActiveVoltage, u2 >= minActiveVoltage, u3 >= minActiveVoltage
// Quine-McCluskey for (¬L1∧L2∧¬L3) ∨ (L1∧L2∧¬L3) ∨ (¬L1∧¬L2∧L3) ∨ (L1∧¬L2∧L3) ∨ (¬L1∧L2∧L3) -> ¬L1 ∧ L3 ∨ L2 ∧ ¬L3 ∨ ¬L2 ∧ L3