From 5773969d9da4b7d9d8b0c196a411822cfd70332b Mon Sep 17 00:00:00 2001 From: Richard van den Berg Date: Wed, 12 Jun 2024 08:03:55 +0200 Subject: [PATCH] Do not reset stopAskingToStartCharging during charge, fixes #575 --- lib/TWCManager/TWCSlave.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/TWCManager/TWCSlave.py b/lib/TWCManager/TWCSlave.py index 8189f484..962a0524 100644 --- a/lib/TWCManager/TWCSlave.py +++ b/lib/TWCManager/TWCSlave.py @@ -543,20 +543,6 @@ def send_master_heartbeat(self): # Car is not charging and is not reporting an error state, so # try starting charge via car api. self.master.startCarsCharging() - elif self.reportedAmpsActual >= 1.0: - # At least one plugged in car is successfully charging. We don't - # know which car it is, so we must set - # vehicle.stopAskingToStartCharging = False on all vehicles such - # that if any vehicle is not charging without us calling - # car_api_charge(False), we'll try to start it charging again at - # least once. This probably isn't necessary but might prevent - # some unexpected case from never starting a charge. It also - # seems less confusing to see in the output that we always try - # to start API charging after the car stops taking a charge. - for vehicle in self.master.getModuleByName( - "TeslaAPI" - ).getCarApiVehicles(): - vehicle.stopAskingToStartCharging = False self.master.getModulesByType("Interface")[0]["ref"].send( bytearray(b"\xFB\xE0")