From 43e04bb7f074bf293ea06b4b7b0b842a826fe211 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Sat, 10 Feb 2024 02:00:20 +0100 Subject: [PATCH] feat: allow to override event more template tunables at addChargingStations UI command MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- README.md | 4 +++- src/charging-station/ChargingStation.ts | 6 ++++++ src/types/ChargingStationWorker.ts | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dab75e45..3ee86b24 100644 --- 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 } } diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index a57f3eaa..c9c8208a 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -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) && diff --git a/src/types/ChargingStationWorker.ts b/src/types/ChargingStationWorker.ts index 346537cb..e6e34a89 100644 --- a/src/types/ChargingStationWorker.ts +++ b/src/types/ChargingStationWorker.ts @@ -15,6 +15,8 @@ export interface ChargingStationOptions extends JsonObject { persistentConfiguration?: boolean autoStart?: boolean autoRegister?: boolean + enableStatistics?: boolean + ocppStrictCompliance?: boolean } export interface ChargingStationWorkerData extends WorkerData { -- 2.34.1