Revert "DSG: match any charging status"
This reverts commit af5ec060bc.
This commit is contained in:
parent
af5ec060bc
commit
7c2df58765
1 changed files with 3 additions and 1 deletions
|
|
@ -156,7 +156,9 @@ 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.Contains(strings.ToUpper(p.Value), "CHARGING") {
|
||||
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")) {
|
||||
status = api.StatusC
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue