Fix charge power estimate in status B not zero when only PV meter installed

This commit is contained in:
andig 2020-03-25 10:39:06 +01:00
parent 97a29d31d7
commit 617b8ea9b5

View file

@ -144,7 +144,7 @@ func (lp *LoadPoint) evChargeCurrentHandler(m *wrapper.ChargeMeter) func(para ..
if !lp.enabled {
current = 0
}
if lp.status != api.StatusB && lp.status != api.StatusC {
if lp.status != api.StatusC {
current = 0
}
m.SetChargeCurrent(current)
@ -289,6 +289,8 @@ func (lp *LoadPoint) updateChargeStatus() api.ChargeStatus {
log.INFO.Printf("%s car disconnected", lp.Name)
}
lp.bus.Publish(evChargeCurrent, lp.targetCurrent)
// start/stop charging cycle
lp.chargingCycle(status == api.StatusC)
}