From: Jérôme Benoit Date: Thu, 27 Apr 2023 19:48:35 +0000 (+0200) Subject: fix: add sanity check at evses initialization X-Git-Tag: v1.2.12~61 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=59a0f26d8d879cd96ba76ba603b20cb2fe99cb94;p=e-mobility-charging-stations-simulator.git fix: add sanity check at evses initialization Signed-off-by: Jérôme Benoit --- 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)