From 0f53d54273e6a75d4450cd402d1b058dcfecee28 Mon Sep 17 00:00:00 2001 From: Ingo <71161062+iseeberg79@users.noreply.github.com> Date: Mon, 19 Jan 2026 19:31:10 +0100 Subject: [PATCH] Planner: add tolerance for single slot use (#26814) --- core/loadpoint_plan.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/loadpoint_plan.go b/core/loadpoint_plan.go index 4c6d3ce47..13513f33a 100644 --- a/core/loadpoint_plan.go +++ b/core/loadpoint_plan.go @@ -169,7 +169,7 @@ func (lp *Loadpoint) plannerActive() (active bool) { if active { // ignore short plans if not already active - if slotRemaining := lp.clock.Until(activeSlot.End); !lp.planActive && slotRemaining < tariff.SlotDuration && !planner.SlotHasSuccessor(activeSlot, plan) { + if slotRemaining := lp.clock.Until(activeSlot.End); !lp.planActive && slotRemaining < tariff.SlotDuration-time.Minute && !planner.SlotHasSuccessor(activeSlot, plan) { lp.log.DEBUG.Printf("plan: slot too short- ignoring remaining %v", slotRemaining.Round(time.Second)) return false }