From: Jérôme Benoit Date: Mon, 25 Sep 2023 20:39:43 +0000 (+0200) Subject: fix: only reset ATG connector status at ATG startup X-Git-Tag: v1.2.23~23 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=9ceba26479a1c3247ae483b2ddd9fb2265d5fdeb;p=e-mobility-charging-stations-simulator.git fix: only reset ATG connector status at ATG startup Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/AutomaticTransactionGenerator.ts b/src/charging-station/AutomaticTransactionGenerator.ts index a6858afe..0ff5c888 100644 --- a/src/charging-station/AutomaticTransactionGenerator.ts +++ b/src/charging-station/AutomaticTransactionGenerator.ts @@ -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 (