From: Jérôme Benoit Date: Wed, 9 Mar 2022 15:48:17 +0000 (+0100) Subject: Fix metervalues payload format X-Git-Tag: v1.1.53~1 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=5e62b11972292c9962946f389689cb1b5f14604c;p=e-mobility-charging-stations-simulator.git Fix metervalues payload format Close #198 Signed-off-by: Jérôme Benoit --- diff --git a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts index 62451445..ab45df16 100644 --- a/src/charging-station/ocpp/1.6/OCPP16RequestService.ts +++ b/src/charging-station/ocpp/1.6/OCPP16RequestService.ts @@ -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: