Skip to content

Commit

Permalink
BMW/Mini: add limit soc (#15168)
Browse files Browse the repository at this point in the history
  • Loading branch information
blenni committed Aug 1, 2024
1 parent 4f0739f commit ec9a2ab
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vehicle/bmw/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,18 @@ func (v *Provider) Odometer() (float64, error) {
return float64(res.State.CurrentMileage), nil
}

var _ api.SocLimiter = (*Provider)(nil)

// GetLimitSoc implements the api.SocLimiter interface
func (v *Provider) GetLimitSoc() (int64, error) {
res, err := v.statusG()
if err != nil {
return 0, err
}

return res.State.ElectricChargingState.ChargingTarget, nil
}

var _ api.Resurrector = (*Provider)(nil)

func (v *Provider) WakeUp() error {
Expand Down

0 comments on commit ec9a2ab

Please sign in to comment.