diff --git a/etc/twcmanager/config.json b/etc/twcmanager/config.json index f99e89f7..d59588bb 100644 --- a/etc/twcmanager/config.json +++ b/etc/twcmanager/config.json @@ -55,7 +55,7 @@ # "charge_amps": "settings.scheduledAmpsMax", # "charge_limit": "config.scheduledLimit"}, - "maxAmpsAllowedFromGrid": 15, + "maxAmpsAllowedFromGrid": 16, # https://teslamotorsclub.com/tmc/threads/model-s-gen2-charger-efficiency-testing.78740/#post-1844789 diff --git a/lib/TWCManager/TWCMaster.py b/lib/TWCManager/TWCMaster.py index b3bc52b1..c3e2942d 100644 --- a/lib/TWCManager/TWCMaster.py +++ b/lib/TWCManager/TWCMaster.py @@ -675,7 +675,7 @@ def getMaxAmpsToDivideFromGrid(self): consumptionA = self.convertWattsToAmps(consumptionW - generationW) # Calculate what we should max offer to align with max grid energy - maxAmpsAllowedFromGrid = self.config["config"]["maxAmpsAllowedFromGrid"] + maxAmpsAllowedFromGrid = self.config["config"].get("maxAmpsAllowedFromGrid", 16) amps = maxAmpsAllowedFromGrid - consumptionA + currentOffer if consumptionA > maxAmpsAllowedFromGrid: logger.info(f"getMaxAmpsToDivideFromGrid limited power: consumption {consumptionA:.1f}A > {maxAmpsAllowedFromGrid}A") @@ -1343,7 +1343,7 @@ def setMaxAmpsToDivideAmongSlaves(self, amps): if amps > self.config["config"]["wiringMaxAmpsAllTWCs"]: # Never tell the slaves to draw more amps than the physical charger # wiring can handle. - logger.info( + logger.error( "ERROR: specified maxAmpsToDivideAmongSlaves " + str(amps) + " > wiringMaxAmpsAllTWCs "