You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1d6272e
Browse filesBrowse the repository at this point in the historyBrowse files
fix(fetch): keep user overrides on session minutes in the threshold stats (#5163 review)
The cap mapped every saving-tagged minute back to its pre-session rate,
including a minute the user had since overridden. A fixed 50p put over a
+50p session to discourage charging read as the 25.95p day rate, so the
manual threshold dropped from 20.47 to 18.46.
A new apply_rate_overrides() helper applies the overrides and manual rates
to the live table and, when there are saving minutes, the same to the
pre-saving snapshot, so the cap takes a session minute back to "these
rates without the session". That covers fixed, increment and manual
overrides alike. With no saving minutes nothing reads the snapshot, so the
overrides are not applied (or logged) twice. compare.py applies a tariff's
own override to a kept snapshot in the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
print("ERROR: {}: rate_import_cost_threshold should be {:.2f} (average with the override kept), got {}".format(label, expected, my_predbat.rate_import_cost_threshold))
449
+
failed=True
450
+
451
+
# With no session minutes nothing reads the snapshot, so it is left untouched
print("ERROR: export snapshots out of order - pre_saving {}, saving slot {}, axle {}, saving minutes {}, basic_rates {}".format(export_pre_saving, export_saving_slot, export_axle_slot, export_saving_minutes, export_basic))
614
+
print("ERROR: export snapshots out of order - pre_saving {}, saving slot {}, axle {}, saving minutes {}, overrides {}".format(export_pre_saving, export_saving_slot, export_axle_slot, export_saving_minutes, export_basic))
567
615
failed=True
568
616
569
617
ifnotaxle_slot<saving_minutes<basic:
570
-
print("ERROR: rate_import_saving_minutes must be snapshotted after the session loaders and before basic_rates() - got axle at {}, snapshot at {}, basic_rates at {}".format(axle_slot, saving_minutes, basic))
618
+
print("ERROR: rate_import_saving_minutes must be snapshotted after the session loaders and before the overrides - got axle at {}, snapshot at {}, overrides at {}".format(axle_slot, saving_minutes, basic))
Copy file name to clipboardExpand all lines: docs/customisation.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -421,7 +421,8 @@ If you set this too high you might not get any export slots. If it's too low you
421
421
422
422
Both thresholds, automatic or set by you, ignore an event price that is above the tariff's own rate (an Octopus saving session
423
423
or Axle event reward): those slots count at the tariff's own rate when the thresholds are worked out, so the event does not
424
-
stretch the range and pull ordinary-price slots in or out. A free or discounted import session still counts as a cheap slot.
424
+
stretch the range and pull ordinary-price slots in or out. A free or discounted import session still counts as a cheap slot,
425
+
and a rate override you put on an event slot (rates_import_override, rates_export_override or a manual rate) is kept.
425
426
The event rates themselves are still used when planning.
426
427
427
428
**input_number.predbat_metric_future_rate_offset_import** (_expert mode_) Default 0p/kWh. Sets a pence per kWh offset to apply to future import energy rates that are
0 commit comments