Elapse guard when loadpoint is out of sync (#9450)

This commit is contained in:
Michael Heß 2023-08-20 12:43:28 +02:00 • committed by GitHub
parent ef358405b1
commit c928dd40f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -667,6 +667,7 @@ func (lp *Loadpoint) syncCharger() error {
if lp.guardGracePeriodElapsed() && lp.phaseSwitchCompleted() && (enabled || lp.connected()) {
lp.log.WARN.Printf("charger out of sync: expected %vd, got %vd", status[lp.enabled], status[enabled])
}
lp.elapseGuard()
return nil
}
@ -674,6 +675,7 @@ func (lp *Loadpoint) syncCharger() error {
if lp.guardGracePeriodElapsed() {
lp.log.WARN.Println("charger logic error: disabled but charging")
}
lp.elapseGuard()
return nil
}