refactor: sensible default at meterValues custom value handling
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 18 Nov 2023 10:20:32 +0000 (11:20 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 18 Nov 2023 10:20:32 +0000 (11:20 +0100)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
src/charging-station/ocpp/1.6/OCPP16ServiceUtils.ts
src/charging-station/ocpp/OCPPServiceUtils.ts

index 6628fb819a0a5d1dbe6951d625ecccf5198a47a3..197fb6a2aeca0e924a677ee0d327f600abc1f926 100644 (file)
@@ -790,8 +790,8 @@ export class OCPP16ServiceUtils extends OCPPServiceUtils {
               connectorMinimumEnergyRounded,
               {
                 limitationEnabled: chargingStation.stationInfo?.customValueLimitationMeterValues,
-                unitMultiplier: unitDivider,
                 fallbackValue: connectorMinimumEnergyRounded,
+                unitMultiplier: unitDivider,
               },
             ),
             energySampledValueTemplate.fluctuationPercent ?? Constants.DEFAULT_FLUCTUATION_PERCENT,
index 8bebe69de44af1176bb22f9839c206dcbfc57214..d9d712981c816790cb4e2b6f1c09fa6cd10e7dac 100644 (file)
@@ -425,7 +425,7 @@ export class OCPPServiceUtils {
   ): number {
     options = {
       ...{
-        limitationEnabled: true,
+        limitationEnabled: false,
         unitMultiplier: 1,
         fallbackValue: 0,
       },