From 8f2548e0207b4f6da2c43461e8c9d901b4f71309 Mon Sep 17 00:00:00 2001 From: MarkusGH <34029447+MarkusGH@users.noreply.github.com> Date: Tue, 17 Oct 2023 12:44:54 +0200 Subject: [PATCH] Prevent premature guard elapse in "charger out of sync" situation (#10340) --- core/loadpoint.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/loadpoint.go b/core/loadpoint.go index 704e9e145..093d448f0 100644 --- a/core/loadpoint.go +++ b/core/loadpoint.go @@ -685,8 +685,8 @@ func (lp *Loadpoint) syncCharger() error { // ignore disabled state if vehicle was disconnected ^(lp.enabled && ^lp.connected) 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() } - lp.elapseGuard() return nil }