From 998de44eb60c49d737dd0cafc852dd7d439d64c1 Mon Sep 17 00:00:00 2001 From: RenatusRo <126881912+RenatusRo@users.noreply.github.com> Date: Sun, 12 Oct 2025 21:12:32 +0200 Subject: [PATCH] Optimizer: fix first slot of homeProfile (#24381) --- core/site_optimizer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/site_optimizer.go b/core/site_optimizer.go index a28e5a8ee..146208a74 100644 --- a/core/site_optimizer.go +++ b/core/site_optimizer.go @@ -392,7 +392,7 @@ func prorateFirstSlot(profile []float64, firstSlotDuration time.Duration) []floa // Take only slots from current hour onwards res := profile[firstSlot:] - res[0] *= float64(firstSlotDuration / tariff.SlotDuration) + res[0] *= float64(firstSlotDuration) / float64(tariff.SlotDuration) return res }