From 617b8ea9b539d6361965a111e41347829b4f8450 Mon Sep 17 00:00:00 2001 From: andig Date: Wed, 25 Mar 2020 10:39:06 +0100 Subject: [PATCH] Fix charge power estimate in status B not zero when only PV meter installed --- core/loadpoint.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/loadpoint.go b/core/loadpoint.go index 656b0e8ab..27c12807d 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -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) }