Loadpoint: set internal current to 0 when disabling charger
This commit is contained in:
parent
11a2d7322e
commit
4249372551
1 changed files with 5 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue