Battery: round instead of truncate
This commit is contained in:
parent
67bf75de8e
commit
ff5c6feb5a
1 changed files with 1 additions and 1 deletions
|
|
@ -396,7 +396,7 @@ func (site *Site) sitePower(totalChargePower float64) (float64, error) {
|
|||
socs += soc / float64(len(site.batteryMeters))
|
||||
}
|
||||
}
|
||||
site.publish("batterySoC", math.Trunc(socs))
|
||||
site.publish("batterySoC", math.Round(socs))
|
||||
|
||||
site.Lock()
|
||||
defer site.Unlock()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue