From 2234dee39421bf3dcc21c45444a3f71ac191d8d3 Mon Sep 17 00:00:00 2001 From: premultiply Date: Tue, 18 Jan 2022 14:24:52 +0100 Subject: [PATCH] Fix pv deactivating when climater active (#2333) --- core/loadpoint.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/loadpoint.go b/core/loadpoint.go index 8d6f65703..b542eab5c 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -1117,8 +1117,8 @@ func (lp *LoadPoint) pvMaxCurrent(mode api.ChargeMode, sitePower float64, batter } } - // in MinPV mode return at least minCurrent - if (mode == api.ModeMinPV || batteryBuffered) && targetCurrent < minCurrent { + // in MinPV mode or under special conditions return at least minCurrent + if (mode == api.ModeMinPV || batteryBuffered || lp.climateActive()) && targetCurrent < minCurrent { return minCurrent } @@ -1462,7 +1462,8 @@ func (lp *LoadPoint) Update(sitePower float64, cheap bool, batteryBuffered bool) var required bool // false if targetCurrent == 0 && lp.climateActive() { - targetCurrent = lp.GetMaxCurrent() + lp.log.DEBUG.Println("climater active") + targetCurrent = lp.GetMinCurrent() required = true }