From 0abf756b0cdf621b1d1d88670b1cefa777be21aa Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 27 Aug 2021 15:56:37 +0200 Subject: [PATCH] Adjust target current based on current target instead of measured value (#1431) --- core/loadpoint.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/loadpoint.go b/core/loadpoint.go index e2664f65d..5bd8a0903 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -797,11 +797,11 @@ func (lp *LoadPoint) updateChargerStatus() error { } // effectiveCurrent returns the currently effective charging current -// it does not take measured currents into account func (lp *LoadPoint) effectiveCurrent() float64 { - // use measured L1 current + // adjust actual current for vehicles like Zoe where it remains below target if lp.chargeCurrents != nil { - return lp.chargeCurrents[0] + cur := lp.chargeCurrents[0] + return math.Min(cur+2.0, lp.chargeCurrent) } if lp.GetStatus() != api.StatusC {