Skip to content

Commit

Permalink
Revert "Fix grid import treated as available power (refs #78)"
Browse files Browse the repository at this point in the history
This reverts commit a21b332.
  • Loading branch information
andig committed May 2, 2020
1 parent a21b332 commit 73753e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/loadpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ func (lp *LoadPoint) evChargeCurrentHandler(m *wrapper.ChargeMeter) func(para ..
}
if current > 0 {
// limit available power to generation plus consumption/ minus delivery
availablePower := math.Abs(lp.pvPower) + lp.availableBatteryPower() - lp.gridPower
availablePower := math.Abs(lp.pvPower) + lp.availableBatteryPower() + lp.gridPower
availableCurrent := int64(powerToCurrent(availablePower, lp.Voltage, lp.Phases))
current = min(current, availableCurrent)
}
Expand Down

0 comments on commit 73753e1

Please sign in to comment.