DSG: match any charging status

This commit is contained in:
andig 2026-07-05 18:09:46 +02:00
parent 0b3b0a642e
commit af5ec060bc

View file

@ -156,9 +156,7 @@ func (v *Provider) Status() (api.ChargeStatus, error) {
}
// block 2: flat charging_state field and the current_charge_state field
if p := lookup(data, FieldChargingState, FieldCurrentChargeState); p != nil &&
(strings.EqualFold(p.Value, "charging") || strings.Contains(strings.ToUpper(p.Value), "CHARGING_HV") ||
strings.EqualFold(p.Value, "conservationCharging") || strings.EqualFold(p.Value, "CHARGE_STATE_CONSERVATION_CHARGING")) {
if p := lookup(data, FieldChargingState, FieldCurrentChargeState); p != nil && strings.Contains(strings.ToUpper(p.Value), "CHARGING") {
status = api.StatusC
}