fix: ensure connectors status are saved is configuration
authorJérôme Benoit <jerome.benoit@sap.com>
Thu, 9 Nov 2023 20:11:03 +0000 (21:11 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Thu, 9 Nov 2023 20:11:03 +0000 (21:11 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ChargingStation.ts

index bd3fb81283b079f66ceed55b380434666c331613..134ccff6d3e7a3aadcb5170a17e0f2e979ec4775 100644 (file)
@@ -1701,6 +1701,10 @@ export class ChargingStation {
               stationInfo: configurationData.stationInfo,
               configurationKey: configurationData.configurationKey,
               automaticTransactionGenerator: configurationData.automaticTransactionGenerator,
+              ...(this.connectors.size > 0 && {
+                connectorsStatus: configurationData.connectorsStatus,
+              }),
+              ...(this.evses.size > 0 && { evsesStatus: configurationData.evsesStatus }),
             } as ChargingStationConfiguration),
           )
           .digest('hex');