From 5c04eed865e910b74a1de4290d30b80bddc9a61b Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Sun, 31 May 2026 09:05:06 +0200 Subject: [PATCH] Cupra: map ChargePurposeReachedAndNotConservationCharging to StatusB (#30343) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> --- vehicle/seat/cupra/provider.go | 2 +- vehicle/seat/cupra/provider_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/vehicle/seat/cupra/provider.go b/vehicle/seat/cupra/provider.go index 9fa3f82b2..984a8d5ae 100644 --- a/vehicle/seat/cupra/provider.go +++ b/vehicle/seat/cupra/provider.go @@ -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 diff --git a/vehicle/seat/cupra/provider_test.go b/vehicle/seat/cupra/provider_test.go index 119743c12..22974c8b5 100644 --- a/vehicle/seat/cupra/provider_test.go +++ b/vehicle/seat/cupra/provider_test.go @@ -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}, }