Fix charging not stopped when energy limit reached (#8768)
This commit is contained in:
parent
a249c864bc
commit
4655593b33
1 changed files with 1 additions and 1 deletions
|
|
@ -746,7 +746,7 @@ func (lp *Loadpoint) setStatus(status api.ChargeStatus) {
|
|||
// remainingChargeEnergy returns missing energy amount in kWh if vehicle has a valid energy target
|
||||
func (lp *Loadpoint) remainingChargeEnergy() (float64, bool) {
|
||||
return math.Max(0, lp.targetEnergy-lp.getChargedEnergy()/1e3),
|
||||
lp.vehicleHasSoc() && lp.targetEnergy > 0
|
||||
!lp.vehicleHasSoc() && lp.targetEnergy > 0
|
||||
}
|
||||
|
||||
func (lp *Loadpoint) vehicleHasSoc() bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue