Disable pv mode countdown on vehicle connection and mode switch

This commit is contained in:
andig 2021-05-15 10:59:16 +02:00
parent ac688cdab7
commit 9042a7528f
2 changed files with 8 additions and 1 deletions

View file

@ -316,9 +316,12 @@ func (lp *LoadPoint) evVehicleConnectHandler() {
lp.socEstimator.Reset()
}
// flush all vahicles before updating state
// flush all vehicles before updating state
provider.ResetCached()
// immediately allow pv mode activity
lp.pvDisableTimer()
lp.triggerEvent(evVehicleConnect)
}

View file

@ -52,6 +52,10 @@ func (lp *LoadPoint) SetMode(mode api.ChargeMode) {
if lp.Mode != mode {
lp.Mode = mode
lp.publish("mode", mode)
// immediately allow pv mode activity
lp.pvDisableTimer()
lp.requestUpdate()
}
}