refactor: cleanup import path
[e-mobility-charging-stations-simulator.git] / src / charging-station / Helpers.ts
index f69d86f8fe180d9af9652ab70626fd65c872b695..2b3e1c7eae58408f212fd79940db666ae1c37cac 100644 (file)
@@ -335,15 +335,22 @@ export const buildConnectorsMap = (
 }
 
 export const setChargingStationOptions = (
+  chargingStation: ChargingStation,
   stationInfo: ChargingStationInfo,
   options?: ChargingStationOptions
 ): ChargingStationInfo => {
+  if (options?.supervisionUrls != null) {
+    chargingStation.setSupervisionUrls(options.supervisionUrls, false)
+  }
   if (options?.persistentConfiguration != null) {
     stationInfo.stationInfoPersistentConfiguration = options.persistentConfiguration
     stationInfo.ocppPersistentConfiguration = options.persistentConfiguration
     stationInfo.automaticTransactionGeneratorPersistentConfiguration =
       options.persistentConfiguration
   }
+  if (options?.autoStart != null) {
+    stationInfo.autoStart = options.autoStart
+  }
   if (options?.autoRegister != null) {
     stationInfo.autoRegister = options.autoRegister
   }
@@ -493,6 +500,7 @@ export const stationTemplateToStationInfo = (
   delete stationTemplate.Evses
   delete stationTemplate.Configuration
   delete stationTemplate.AutomaticTransactionGenerator
+  delete stationTemplate.numberOfConnectors
   delete stationTemplate.chargeBoxSerialNumberPrefix
   delete stationTemplate.chargePointSerialNumberPrefix
   delete stationTemplate.meterSerialNumberPrefix