Repository navigation
[BUG] Time Slot mode evaluates deficit until midnight – cheap window stays unused when solar covers the day #611
Replies: 3 comments 2 replies
|
Thanks for the detailed write-up. This isn't a bug: Time Slot mode is deliberately designed to evaluate the energy balance up to midnight, and it's behaving as intended. What you're describing is a change to that design, a horizon that reaches the next configured cheap window, so I'm treating this as a feature request. The idea makes sense for multi-window tariffs, though. The gap that really matters is midnight → 02:00, since the 18:00–21:00 peak already falls inside today's horizon. To get it right, the balance and the chronological planner would both need to use the same new horizon. |
|
Notes for a future implementation, so this can be picked up later: Goal: in Time Slot mode, size the charge in the active window against demand up to the start of the next enabled window, instead of midnight. What needs to change
Tests
Caveat: in the example above, 56.6 kWh of battery + solar vs 22.6 kWh of load is mostly solar that 3× Venus can't store (≈15 kWh usable). A longer horizon helps, but the result also depends on the hourly solar shape that the chronological planner already models. |
|
Thanks for the suggestion! 🙌 Here's how this works:
If your idea is very specific to your setup, it may not make it into the core integration — I'll try to suggest a workaround in that case. Feel free to discuss details or alternatives below. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Affected area
Charging, discharging, or power control
Omnibattery version
1.5.0
Home Assistant version
2026.10.1
Installation details
• 3× Marstek Venus E v2
• Predictive mode with Time Slots: 02:00–06:00 and 12:00–16:00 (e.g. Octopus Heat)
• Solcast forecast (remaining_today)
What happened?
In Time Slot mode, the planner evaluates the energy balance using a fixed horizon until midnight.
On days with strong solar yield, energy_deficit_kwh drops to 0, causing the planner to skip an active cheap charging window (e.g., 12:00–16:00). However, the battery capacity is insufficient to cover the subsequent evening peak (18:00–21:00) until the next cheap window (02:00 the following morning).
This full-day horizon leads to avoidable expensive grid imports during evening peaks.
Steps to reproduce
Tariff: Cheap slots 02:00–06:00 & 12:00–16:00 (17.24 ct), Peak 18:00–21:00 (29.25 ct).
Planner evaluation at 12:00:
• Usable battery + forecast solar (remaining day): 56.57 kWh
• Remaining consumption: 22.62 kWh
• energy_deficit_kwh: 0.0
• planned_grid_charge_kwh: 0.0
Result: No charging is scheduled between 12:00–16:00. The evening peak must be covered by expensive grid power, even though pre-charging at 17.24 ct would have been financially optimal (even after round-trip losses).
Expected behavior
Change the planning horizon from "until midnight" to "from the end of this cheap window until the start of the next configured cheap window":
• Window 1 (02:00–06:00): Horizon covers consumption until 12:00.
• Window 2 (12:00–16:00): Horizon covers consumption until 02:00 the next morning (effectively including the evening peak).
• Single-window or last window of the day: Keep current midnight/fallback boundary.
• All existing logic (SOC limits, minimum SOC, quotas, PID control) remains untouched—only the evaluation window length changes.
Why this matters
Crucial for any multi-window Time-of-Use (ToU) tariffs (e.g., night + midday slots, heat-pump tariffs like Octopus Heat).
Relevant Home Assistant logs
Diagnostics file
No response
Additional context
No response
Confirmations
All reactions