Skip to content

Commit

Permalink
Zendure: fix battery power (#17443)
Browse files Browse the repository at this point in the history
  • Loading branch information
Raudi1 authored Nov 25, 2024
1 parent aa513c4 commit d7e87bf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion meter/zendure.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func (c *Zendure) CurrentPower() (float64, error) {
case "pv":
return float64(res.SolarInputPower), nil
case "battery":
return float64(res.GridInputPower) - float64(res.OutputHomePower), nil
return float64(res.PackInputPower) - float64(res.OutputPackPower), nil
default:
return 0, fmt.Errorf("invalid usage: %s", c.usage)
}
Expand Down
1 change: 1 addition & 0 deletions meter/zendure/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ type Data struct {
MasterSwitch bool `json:"masterSwitch"` // true,
OutputLimit int `json:"outputLimit"` // 0,
OutputPackPower int `json:"outputPackPower"` // 70,
PackInputPower int `json:"packInputPower"` // 70,
OutputHomePower int `json:"outputHomePower"` // 70,
PackNum int `json:"packNum"` // 1,
PackState int `json:"packState"` // 0,
Expand Down

0 comments on commit d7e87bf

Please sign in to comment.