fix: fix number of available evses calculation
[e-mobility-charging-stations-simulator.git] / src / charging-station / ChargingStationUtils.ts
index 9f93e5ffe0c8be18c33d26604f3d96af65be7682..49a61101533043ae15cb09c6783eb197bf452cfd 100644 (file)
@@ -171,7 +171,7 @@ export class ChargingStationUtils {
   ): void {
     if (!Utils.isNullOrUndefined(connectorStatus?.status)) {
       logger.warn(
-        `${logPrefix} Charging station information from template ${templateFile} with connector ${connectorId} status configuration defined, undefine it`
+        `${logPrefix} Charging station information from template ${templateFile} with connector id ${connectorId} status configuration defined, undefine it`
       );
       delete connectorStatus.status;
     }
@@ -210,15 +210,12 @@ export class ChargingStationUtils {
     for (const connectorId of connectors.keys()) {
       if (connectorId > 0 && connectors.get(connectorId)?.transactionStarted === true) {
         logger.warn(
-          `${logPrefix} Connector ${connectorId} at initialization has a transaction started: ${
+          `${logPrefix} Connector id ${connectorId} at initialization has a transaction started with id ${
             connectors.get(connectorId)?.transactionId
           }`
         );
       }
-      if (
-        connectorId === 0 &&
-        Utils.isNullOrUndefined(connectors.get(connectorId)?.transactionStarted)
-      ) {
+      if (connectorId === 0) {
         connectors.get(connectorId).availability = AvailabilityType.Operative;
         if (Utils.isUndefined(connectors.get(connectorId)?.chargingProfiles)) {
           connectors.get(connectorId).chargingProfiles = [];
@@ -559,7 +556,7 @@ export class ChargingStationUtils {
   }
 
   /**
-   * Charging profiles should already be sorted by connectorId and stack level (highest stack level has priority)
+   * Charging profiles should already be sorted by connector id and stack level (highest stack level has priority)
    *
    * @param chargingProfiles -
    * @param logPrefix -