Ignore the EV if it is charging at a DC station (#1258)

This commit is contained in:
Andreas Linde 2021-08-01 21:11:59 +02:00 • committed by GitHub
parent 02c8729ce7
commit 2b430ae9b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,6 +187,10 @@ func (v *EMobilityProvider) Status() (api.ChargeStatus, error) {
case "DISCONNECTED":
return api.StatusA, nil
case "CONNECTED":
// ignore if the car is connected to a DC charging station
if res.BatteryChargeStatus.ChargingInDCMode {
return api.StatusA, nil
}
switch res.BatteryChargeStatus.ChargingState {
case "OFF", "COMPLETED":
return api.StatusB, nil