diff --git a/core/loadpoint_plan.go b/core/loadpoint_plan.go index 2a9aa7c28..e500b2bfa 100644 --- a/core/loadpoint_plan.go +++ b/core/loadpoint_plan.go @@ -123,8 +123,9 @@ func (lp *Loadpoint) plannerActive() (active bool) { if active { // ignore short plans if not already active - if !lp.planActive && lp.clock.Until(activeSlot.End) < smallSlotDuration { - lp.log.DEBUG.Printf("plan too short- ignoring remaining %v", requiredDuration.Round(time.Second)) + // TODO only ignore if the next adjacent slot is inactive, too + if slotRemaining := lp.clock.Until(activeSlot.End); !lp.planActive && slotRemaining < smallSlotDuration { + lp.log.DEBUG.Printf("plan slot too short- ignoring remaining %v", slotRemaining.Round(time.Second)) return false }