Polestar: fix api
This commit is contained in:
parent
53e19a4efc
commit
9ea6ed6d1c
2 changed files with 2 additions and 2 deletions
|
|
@ -27,7 +27,7 @@ func NewProvider(log *util.Logger, api *API, vin string, timeout, cache time.Dur
|
|||
// SOC via car telemetry
|
||||
func (v *Provider) Soc() (float64, error) {
|
||||
res, err := v.telemetryG()
|
||||
return float64(res.Battery[0].BatteryChargeLevelPercentage), err
|
||||
return res.Battery[0].BatteryChargeLevelPercentage, err
|
||||
}
|
||||
|
||||
var _ api.ChargeState = (*Provider)(nil)
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ type HealthData struct {
|
|||
|
||||
type BatteryData struct {
|
||||
VIN string
|
||||
BatteryChargeLevelPercentage int64
|
||||
BatteryChargeLevelPercentage float64
|
||||
ChargingStatus string
|
||||
EstimatedChargingTimeToFullMinutes int64
|
||||
EstimatedDistanceToEmptyKm int64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue