Removed static limit reset + current limit bug
MODIFY
src/integration/charging-station-vendor/ChargingStationVendorIntegration.ts
src/integration/charging-station-vendor/ChargingStationVendorIntegration.ts
@@ -304,20 +304,8 @@ export default abstract class ChargingStationVendorIntegration {
});
results.push(ret);
}
- // Reapply the current limitation
- for (const chargePoint of chargingStation.chargePoints) {
- await this.setStaticPowerLimitation(tenant, chargingStation, chargePoint,
- this.getStaticPowerLimitation(chargingStation, chargePoint));
- }
return results;
}
- // Reapply the current limitation
- if (result.status === OCPPClearChargingProfileStatus.ACCEPTED) {
- for (const chargePoint of chargingStation.chargePoints) {
- await this.setStaticPowerLimitation(tenant, chargingStation, chargePoint,
- this.getStaticPowerLimitation(chargingStation, chargePoint));
- }
- }
return result;
}
// Connector ID > 0
@@ -325,13 +313,6 @@ export default abstract class ChargingStationVendorIntegration {
const result = await chargingStationClient.clearChargingProfile({
connectorId: chargingProfile.connectorID
});
- // Reapply the current limitation
- if (result.status === OCPPClearChargingProfileStatus.ACCEPTED) {
- for (const chargePoint of chargingStation.chargePoints) {
- await this.setStaticPowerLimitation(tenant, chargingStation, chargePoint,
- this.getStaticPowerLimitation(chargingStation, chargePoint));
- }
- }
return result;
} catch (error) {
await Logging.logError({
@@ -654,6 +635,8 @@ export default abstract class ChargingStationVendorIntegration {
if (moment(chargingSchedule.startSchedule).isAfter(now)) {
chargingSchedule.startSchedule.setDate(currentDate.getDate() - 1);
}
+ } else if (moment(chargingSchedule.startSchedule).isAfter(now)) {
+ return null;
}
// Check if the Charging Profile is active
if (moment(chargingSchedule.startSchedule).add(chargingSchedule.duration, 's').isAfter(now)) {

Removed static limit reset + current limit bug