Use battery buffer only when already charging

This commit is contained in:
andig 2023-02-14 22:36:33 +01:00
parent bd236d7ee4
commit 99595b72cd

View file

@ -1090,7 +1090,7 @@ func (lp *Loadpoint) pvMaxCurrent(mode api.ChargeMode, sitePower float64, batter
lp.log.DEBUG.Printf("pv charge current: %.3gA = %.3gA + %.3gA (%.0fW @ %dp)", targetCurrent, effectiveCurrent, deltaCurrent, sitePower, activePhases)
// in MinPV mode or under special conditions return at least minCurrent
if (mode == api.ModeMinPV || batteryBuffered || lp.climateActive()) && targetCurrent < minCurrent {
if (mode == api.ModeMinPV || batteryBuffered && lp.charging()) && targetCurrent < minCurrent {
return minCurrent
}