Volvo: fix range (#26675)
This commit is contained in:
parent
b02f3d98eb
commit
4cf9c17e6b
2 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ var _ api.VehicleRange = (*Provider)(nil)
|
|||
// Range implements the api.VehicleRange interface
|
||||
func (v *Provider) Range() (rng int64, err error) {
|
||||
res, err := v.statusG()
|
||||
return res.ElectricRange.Value, err
|
||||
return int64(res.ElectricRange.Value), err
|
||||
}
|
||||
|
||||
var _ api.VehicleFinishTimer = (*Provider)(nil)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ type EnergyState struct {
|
|||
}
|
||||
ElectricRange struct {
|
||||
Status string
|
||||
Value int64
|
||||
Value float64
|
||||
Unit string
|
||||
Timestamp time.Time
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue