Planner: add tolerance for single slot use (#26814)
This commit is contained in:
parent
8388363586
commit
0f53d54273
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue