chore: avoid warning (#13253)

Add check for phaseSwitchCompleted to avoid potentially unnecessary warning
This commit is contained in:
MarkusGH 2024-04-04 19:25:24 +02:00 • committed by GitHub
parent 461db8cb23
commit cc24f44a61
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1072,7 +1072,7 @@ func (lp *Loadpoint) pvScalePhases(sitePower, minCurrent, maxCurrent float64) bo
// - https://github.com/evcc-io/evcc/issues/2613
measuredPhases := lp.getMeasuredPhases()
if phases > 0 && phases < measuredPhases {
if lp.chargerUpdateCompleted() {
if lp.chargerUpdateCompleted() && lp.phaseSwitchCompleted() {
lp.log.WARN.Printf("ignoring inconsistent phases: %dp < %dp observed active", phases, measuredPhases)
}
lp.resetMeasuredPhases()