From 3581a3a2ccf3e50bfdaac0d4774ddeeaabc586dd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Fri, 18 Mar 2022 16:17:11 +0100 Subject: [PATCH] Fix maximun charging station amperage 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 5f5de2dc..55b58794 100644 --- a/src/charging-station/ChargingStation.ts +++ b/src/charging-station/ChargingStation.ts @@ -1591,8 +1591,8 @@ export default class ChargingStation { case CurrentType.AC: return ACElectricUtils.amperagePerPhaseFromPower( this.getNumberOfPhases(), - (this.stationInfo['maxPower'] as number) ?? - this.stationInfo.maximumPower / this.getNumberOfConnectors(), + ((this.stationInfo['maxPower'] as number) ?? this.stationInfo.maximumPower) / + this.getNumberOfConnectors(), this.getVoltageOut() ); case CurrentType.DC: -- 2.34.1