Loadpoint: set internal current to 0 when disabling charger

This commit is contained in:
andig 2024-08-03 13:29:16 +02:00
parent 11a2d7322e
commit 4249372551

View file

@ -862,6 +862,11 @@ func (lp *Loadpoint) setLimit(chargeCurrent float64) error {
lp.setAndPublishEnabled(enabled)
lp.chargerSwitched = lp.clock.Now()
// ensure we always re-set current when enabling charger
if !enabled {
lp.chargeCurrent = 0
}
lp.bus.Publish(evChargeCurrent, chargeCurrent)
// start/stop vehicle wake-up timer