Loadpoint: improve battery boost coarse current step-up (#20969)

This commit is contained in:
mfuchs1984 2025-05-01 11:29:49 +02:00 • committed by GitHub
parent dd20bf8882
commit 28fc4b65b8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1332,7 +1332,11 @@ func (lp *Loadpoint) boostPower(batteryBoostPower float64) float64 {
delta := math.Max(100, math.Abs(lp.site.GetResidualPower()))
if lp.coarseCurrent() {
delta = math.Max(delta, lp.EffectiveStepPower())
// add effective step power to delta to make sure to step up to the next full amp
// just using lp.EffectiveStepPower() as delta is not enough because this will result
// in a too low current when there is a bit remaining grid consumption due to the accuracy
// of the battery controller
delta += lp.EffectiveStepPower()
}
// start boosting by setting maximum power