X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=src%2Fcharging-station%2Focpp%2F1.6%2FOCPP16ServiceUtils.ts;h=6628fb819a0a5d1dbe6951d625ecccf5198a47a3;hb=1b2cddaccac1c179067c7b8ce190c625c37dd5c5;hp=b28d682e9d654066143214f6ba834b017f1bcdaa;hpb=969c488ddeab6f7fb11a376a4a4d1db497aef96d;p=e-mobility-charging-stations-simulator.git diff --git a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts index b28d682e..6628fb81 100644 --- a/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts +++ b/src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts @@ -1335,7 +1335,6 @@ export class OCPP16ServiceUtils extends OCPPServiceUtils { context?: MeterValueContext, phase?: OCPP16MeterValuePhase, ): OCPP16SampledValue { - const sampledValueValue = value ?? sampledValueTemplate?.value; const sampledValueContext = context ?? sampledValueTemplate?.context; const sampledValueLocation = sampledValueTemplate?.location ?? @@ -1350,7 +1349,7 @@ export class OCPP16ServiceUtils extends OCPPServiceUtils { measurand: sampledValueTemplate.measurand, }), ...(!isNullOrUndefined(sampledValueLocation) && { location: sampledValueLocation }), - ...(!isNullOrUndefined(sampledValueValue) && { value: sampledValueValue.toString() }), + ...(!isNullOrUndefined(value) && { value: value.toString() }), ...(!isNullOrUndefined(sampledValuePhase) && { phase: sampledValuePhase }), } as OCPP16SampledValue; }