Fix metervalues payload format
authorJérôme Benoit <jerome.benoit@sap.com>
Wed, 9 Mar 2022 15:48:17 +0000 (16:48 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Wed, 9 Mar 2022 15:48:17 +0000 (16:48 +0100)
Close #198

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

index 62451445381359d922b377a9a98bca8cd0615260..ab45df16b83261b5385c6328bf60806036fee1ab 100644 (file)
@@ -100,8 +100,8 @@ export default class OCPP16RequestService extends OCPPRequestService {
         return {
           connectorId: commandParams?.connectorId,
           transactionId: commandParams?.transactionId,
-          meterValue: Array.isArray(commandParams?.meterValues)
-            ? commandParams?.meterValues
+          meterValue: Array.isArray(commandParams?.meterValue)
+            ? commandParams?.meterValue
             : [commandParams?.meterValue],
         } as MeterValuesRequest;
       case OCPP16RequestCommand.STATUS_NOTIFICATION: