feat: allow to override event more template tunables at addChargingStations UI
authorJérôme Benoit <jerome.benoit@sap.com>
Sat, 10 Feb 2024 01:00:20 +0000 (02:00 +0100)
committerJérôme Benoit <jerome.benoit@sap.com>
Sat, 10 Feb 2024 01:00:20 +0000 (02:00 +0100)
command

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
README.md
src/charging-station/ChargingStation.ts
src/types/ChargingStationWorker.ts

index dab75e457fef813dfc671ec782fca86d1c2d6760..3ee86b24a41897f364a4654370436f23e92168cd 100644 (file)
--- a/README.md
+++ b/README.md
@@ -575,7 +575,9 @@ Set the Websocket header _Sec-Websocket-Protocol_ to `ui0.0.1`.
    `options?`: {  
    `persistentConfiguration?`: boolean,  
    `autoStart?`: boolean,  
-   `autoRegister?`: boolean  
+   `autoRegister?`: boolean,  
+   `enableStatistics?`: boolean,  
+   `ocppStrictCompliance?`: boolean  
    }  
   }
 
index a57f3eaa071ecfceb7fd38b6d99ec3c9ef97d453..c9c8208a32bbe797d1be024d40ddabaa85099fee 100644 (file)
@@ -1283,6 +1283,12 @@ export class ChargingStation extends EventEmitter {
     if (options?.autoRegister != null) {
       this.stationInfo.autoRegister = options.autoRegister
     }
+    if (options?.enableStatistics != null) {
+      this.stationInfo.enableStatistics = options.enableStatistics
+    }
+    if (options?.ocppStrictCompliance != null) {
+      this.stationInfo.ocppStrictCompliance = options.ocppStrictCompliance
+    }
     if (
       this.stationInfo.firmwareStatus === FirmwareStatus.Installing &&
       isNotEmptyString(this.stationInfo.firmwareVersion) &&
index 346537cb28c24024f0787b3e150e969555206faa..e6e34a8962f1f70b374c2f7eceaea4b3c7c3263e 100644 (file)
@@ -15,6 +15,8 @@ export interface ChargingStationOptions extends JsonObject {
   persistentConfiguration?: boolean
   autoStart?: boolean
   autoRegister?: boolean
+  enableStatistics?: boolean
+  ocppStrictCompliance?: boolean
 }
 
 export interface ChargingStationWorkerData extends WorkerData {