fix: only reset ATG connector status at ATG startup
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 25 Sep 2023 20:39:43 +0000 (22:39 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 25 Sep 2023 20:39:43 +0000 (22:39 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/AutomaticTransactionGenerator.ts

index a6858afe7acac7fdfc8a18b4713ae2a59db995e5..0ff5c888a2536c8ca4332f8cde5190b3721bf731 100644 (file)
@@ -363,7 +363,7 @@ export class AutomaticTransactionGenerator extends AsyncResource {
     delete connectorStatus?.lastRunDate;
     delete connectorStatus?.stopDate;
     delete connectorStatus?.stoppedDate;
-    if (connectorStatus?.start === true) {
+    if (!this.started && connectorStatus?.start === true) {
       connectorStatus.start = false;
     }
     return (