Volvo: fix range (#26675)

This commit is contained in:
mfuchs1984 2026-01-13 22:23:10 +01:00 • committed by GitHub
parent b02f3d98eb
commit 4cf9c17e6b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -71,7 +71,7 @@ var _ api.VehicleRange = (*Provider)(nil)
// Range implements the api.VehicleRange interface // Range implements the api.VehicleRange interface
func (v *Provider) Range() (rng int64, err error) { func (v *Provider) Range() (rng int64, err error) {
res, err := v.statusG() res, err := v.statusG()
return res.ElectricRange.Value, err return int64(res.ElectricRange.Value), err
} }
var _ api.VehicleFinishTimer = (*Provider)(nil) var _ api.VehicleFinishTimer = (*Provider)(nil)

View file

@ -11,7 +11,7 @@ type EnergyState struct {
} }
ElectricRange struct { ElectricRange struct {
Status string Status string
Value int64 Value float64
Unit string Unit string
Timestamp time.Time Timestamp time.Time
} }