From 007b5bdeabda751743fdff8faac672b3ec57fb61 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 28 Apr 2023 14:25:35 +0200 Subject: [PATCH] fix: fix number of available evses calculation 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/charging-station/ChargingStation.ts b/src/charging-station/ChargingStation.ts index 6ea862e7..70f511e0 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -263,11 +263,11 @@ export class ChargingStation { } return numberOfConnectors; } - return this.connectors.get(0) ? this.connectors.size - 1 : this.connectors.size; + return this.connectors.has(0) ? this.connectors.size - 1 : this.connectors.size; } public getNumberOfEvses(): number { - return this.evses.size; + return this.evses.has(0) ? this.evses.size - 1 : this.evses.size; } public getConnectorStatus(connectorId: number): ConnectorStatus | undefined { -- 2.34.1