Cupra: map ChargePurposeReachedAndNotConservationCharging to StatusB (#30343)
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
parent
24e0e10443
commit
5c04eed865
2 changed files with 3 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ func (v *Provider) Status() (api.ChargeStatus, error) {
|
|||
}
|
||||
|
||||
switch strings.ToLower(res.Services.Charging.Status) {
|
||||
case "connected", "readyforcharging", "notreadyforcharging", "error":
|
||||
case "connected", "readyforcharging", "notreadyforcharging", "error", "chargepurposereachedandnotconservationcharging":
|
||||
return api.StatusB, nil
|
||||
case "charging":
|
||||
return api.StatusC, nil
|
||||
|
|
|
|||
|
|
@ -31,6 +31,8 @@ func TestProviderStatus(t *testing.T) {
|
|||
{"connected", "Connected", "", api.StatusB},
|
||||
// fault / error while plugged
|
||||
{"error", "error", "", api.StatusB},
|
||||
// target SoC reached in myCupra, cable still connected (#30118)
|
||||
{"soc_reached", "ChargePurposeReachedAndNotConservationCharging", "", api.StatusB},
|
||||
// unknown future status with no card info defaults to disconnected
|
||||
{"unknown", "SomethingNew", "", api.StatusA},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue