fix: fix connector 0 handling in ConnectorPhaseRotation OCPP
authorJérôme Benoit <jerome.benoit@sap.com>
Fri, 10 Nov 2023 22:33:29 +0000 (23:33 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Fri, 10 Nov 2023 22:33:29 +0000 (23:33 +0100)
configuration

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/Helpers.ts

index e66043e9906cd1d00e185a733ad5c2fdb67f0cc6..f0f848d38c96cfdddc9a5fce3ae7d68d5622ba2c 100644 (file)
@@ -175,9 +175,9 @@ export const getPhaseRotationValue = (
   } else if (connectorId > 0 && numberOfPhases === 0) {
     return `${connectorId}.${ConnectorPhaseRotation.NotApplicable}`;
     // AC
-  } else if (connectorId > 0 && numberOfPhases === 1) {
+  } else if (connectorId >= 0 && numberOfPhases === 1) {
     return `${connectorId}.${ConnectorPhaseRotation.NotApplicable}`;
-  } else if (connectorId > 0 && numberOfPhases === 3) {
+  } else if (connectorId >= 0 && numberOfPhases === 3) {
     return `${connectorId}.${ConnectorPhaseRotation.RST}`;
   }
 };