Fix energy calculation (#188)
This commit is contained in:
parent
221985ff7d
commit
dc6da4416f
1 changed files with 1 additions and 1 deletions
|
|
@ -136,7 +136,7 @@ func (c *GoE) CurrentPower() (float64, error) {
|
|||
func (c *GoE) ChargedEnergy() (float64, error) {
|
||||
var status goeStatusResponse
|
||||
_, err := c.GetJSON(c.apiURL(goeStatus), &status)
|
||||
energy := float64(status.Dws) / 3.6e6
|
||||
energy := float64(status.Dws) / 3.6e5 // Deka-Watt-Seconds to kWh (100.000 == 0,277kWh)
|
||||
return energy, err
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue