fix: ensure custom meterValues values are taken
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 13 Nov 2023 09:15:02 +0000 (10:15 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 13 Nov 2023 09:15:02 +0000 (10:15 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts

index 63339cf245db3a7ed84bbae3961be76eee14ae42..a752ac9927e2932d4eac5700acb7505db20c9903 100644 (file)
@@ -372,7 +372,7 @@ export class OCPP16ServiceUtils extends OCPPServiceUtils {
                 connectorMinimumPowerPerPhase / unitDivider,
               );
           } else {
-            powerMeasurandValues.L1 = powerSampledValueTemplate.value
+            powerMeasurandValues.L1 = isNotEmptyString(powerSampledValueTemplate.value)
               ? getRandomFloatFluctuatedRounded(
                   OCPP16ServiceUtils.getLimitFromSampledValueTemplateCustomValue(
                     powerSampledValueTemplate.value,