Mercedes: fix EQV maxSoc (#15215)
This commit is contained in:
parent
03f62e5593
commit
11a2d7322e
1 changed files with 5 additions and 4 deletions
|
|
@ -97,6 +97,10 @@ func (v *API) Status(vin string) (StatusResponse, error) {
|
|||
res.EvInfo.Battery.ChargingStatus = 3
|
||||
}
|
||||
|
||||
if val, ok := message.Attributes["maxSoc"]; ok && val != nil {
|
||||
res.EvInfo.Battery.SocLimit = int(val.GetIntValue())
|
||||
}
|
||||
|
||||
if val, ok := message.Attributes["selectedChargeProgram"]; ok && val != nil {
|
||||
selectedChargeProgram := val.GetIntValue()
|
||||
res.EvInfo.Battery.SelectedChargeProgram = int(selectedChargeProgram)
|
||||
|
|
@ -108,10 +112,7 @@ func (v *API) Status(vin string) (StatusResponse, error) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if val, ok := message.Attributes["maxSoc"]; ok && val != nil {
|
||||
res.EvInfo.Battery.SocLimit = int(val.GetIntValue())
|
||||
}
|
||||
}
|
||||
|
||||
return res, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue