Fiat: allow float values for soc
This commit is contained in:
parent
a924483398
commit
43c40f01be
2 changed files with 6 additions and 6 deletions
|
|
@ -89,7 +89,7 @@ func (v *Provider) status(statusG func() (StatusResponse, error)) (StatusRespons
|
|||
func (v *Provider) SoC() (float64, error) {
|
||||
res, err := v.statusG()
|
||||
if res, ok := res.(StatusResponse); err == nil && ok {
|
||||
return float64(res.EvInfo.Battery.StateOfCharge), nil
|
||||
return res.EvInfo.Battery.StateOfCharge, nil
|
||||
}
|
||||
|
||||
return 0, err
|
||||
|
|
|
|||
|
|
@ -31,11 +31,11 @@ type StatusResponse struct {
|
|||
Value int
|
||||
Unit string
|
||||
}
|
||||
PlugInStatus bool // true
|
||||
StateOfCharge int // 75
|
||||
TimeToFullyChargeL1 int // 0
|
||||
TimeToFullyChargeL2 int // 540
|
||||
TotalRange int // 17
|
||||
PlugInStatus bool // true
|
||||
StateOfCharge float64 // 75
|
||||
TimeToFullyChargeL1 int // 0
|
||||
TimeToFullyChargeL2 int // 540
|
||||
TotalRange int // 17
|
||||
}
|
||||
Timestamp TimeMillis
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue