From 5e62b11972292c9962946f389689cb1b5f14604c Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Wed, 9 Mar 2022 16:48:17 +0100 Subject: [PATCH] Fix metervalues payload format MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Close #198 Signed-off-by: Jérôme Benoit --- src/charging-station/ocpp/1.6/OCPP16RequestService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: -- 2.34.1