Cupra: map ChargePurposeReachedAndNotConservationCharging to StatusB (#30343)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot 2026-05-31 09:05:06 +02:00 • committed by GitHub
parent 24e0e10443
commit 5c04eed865
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View file

@ -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

View file

@ -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},
}