From c2127075eade41f617bd7d7fd988bd72cabbe645 Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Thu, 1 Jun 2023 08:28:21 +0200 Subject: [PATCH] Use getMaxAmpsToDivideAmongSlaves() if getTotalAmpsInUse() is not available --- lib/TWCManager/TWCMaster.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/TWCManager/TWCMaster.py b/lib/TWCManager/TWCMaster.py index 36a37bf9..882b31b6 100644 --- a/lib/TWCManager/TWCMaster.py +++ b/lib/TWCManager/TWCMaster.py @@ -668,7 +668,7 @@ def getMaxAmpsToDivideFromGrid(self): currentOffer = min( self.getTotalAmpsInUse(), self.getMaxAmpsToDivideAmongSlaves(), - ) + ) if self.getTotalAmpsInUse() > 0 else self.getMaxAmpsToDivideAmongSlaves() # Get consumptions in Amps, if the EMS source supports it consumptionA = float(self.getConsumptionAmps())