Target charging: use 3p if supported

This commit is contained in:
andig 2021-12-19 11:40:15 +01:00
parent 96fb4cf01c
commit 2a320d1379

View file

@ -1401,8 +1401,11 @@ func (lp *LoadPoint) Update(sitePower float64, cheap bool, batteryBuffered bool)
// target charging
case lp.socTimer.DemandActive():
targetCurrent := lp.socTimer.Handle()
err = lp.setLimit(targetCurrent, true)
// 3p if available
if err = lp.scalePhasesIfAvailable(3); err == nil {
targetCurrent := lp.socTimer.Handle()
err = lp.setLimit(targetCurrent, true)
}
case mode == api.ModeMinPV || mode == api.ModePV:
targetCurrent := lp.pvMaxCurrent(mode, sitePower, batteryBuffered)