From 59a0f26d8d879cd96ba76ba603b20cb2fe99cb94 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Thu, 27 Apr 2023 21:48:35 +0200 Subject: [PATCH] fix: add sanity check at evses initialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/ChargingStation.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index d830d747..928a8317 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1411,6 +1411,13 @@ export class ChargingStation { } with no evse id 0 configuration` ); } + if (!stationInfo?.Evses[0]?.Connectors[0]) { + logger.warn( + `${this.logPrefix()} Charging station information from template ${ + this.templateFile + } with evse id 0 with no connector id 0 configuration` + ); + } if (stationInfo?.Evses) { const evsesConfigHash = crypto .createHash(Constants.DEFAULT_HASH_ALGORITHM) -- 2.34.1