Skip to content

fix(config): widen currency-scoped price ranges for non-GBP markets - #4615

Merged
springfall2008 merged 1 commit into
mainfrom
fix/widen-price-config-ranges
Aug 20, 2026
Merged

fix(config): widen currency-scoped price ranges for non-GBP markets#4615
springfall2008 merged 1 commit into
mainfrom
fix/widen-price-config-ranges

Conversation

@chalfontchubby

Copy link
Copy Markdown
Collaborator

Summary

Fixes #4614. car_charging_plan_max_price was capped at -99..99 (p), too narrow for markets like Denmark where prices in øre routinely exceed 99. The raw number entered isn't currency-converted anywhere, so a range tuned for GBP pence is too narrow for any minor-unit currency with a higher nominal scale.

  • car_charging_plan_max_price: -99..99-1000..1000. Matches the range already used by manual_import_value/manual_export_value/iboost_rate_threshold/iboost_rate_threshold_export (same class of field - an absolute price, not a small delta) rather than inventing a new one. Kept symmetric (not just raising the max) for V2G setups, where export-side prices can be just as extreme as import-side.
  • combine_rate_threshold: 0..50..1000 (p). Same currency-scale problem, same fix. Min stays 0 - it's a slot-combining tolerance, not a price cap, so negative doesn't apply.
  • export_more_solar_threshold: 0..100..1000 (p). Same reasoning, min stays 0 for the same reason.

Checked every other currency-denominated input_number in config.py for the same issue - metric_min_improvement*, metric_battery_cycle, metric_future_rate_offset_import/export are the same class of exposure in principle, but they're threshold/offset semantics rather than absolute price caps, already have some room (-50..50/250), and nobody's reported hitting them - left alone for now rather than widening speculatively.

Test plan

  • ./run_all --test car_charging_smart --test find_charge_window --test optimise_solar --test multi_car_iog --test web_functions - all tests touching these three config items pass unchanged (none assert on the old min/max bounds, only set values well within both ranges)
  • ./run_all --quick passes
  • ./run_pre_commit passes

🤖 Generated with Claude Code

car_charging_plan_max_price was capped at -99..99p, too narrow for
markets like Denmark where prices in øre routinely exceed 99 (#4614).
The raw numeric value entered isn't currency-converted, so a range
tuned for GBP pence is too narrow for any minor-unit currency with a
higher nominal scale.

Widened to -1000..1000, matching the existing convention already used
by manual_import_value/manual_export_value/iboost_rate_threshold*
(same class of field: an absolute price, not a small delta). Kept it
symmetric rather than just raising the max, for V2G setups where
export-side prices can be as extreme as import-side.

Same currency-scale problem applies to combine_rate_threshold (was
0-5p) and export_more_solar_threshold (was 0-10p) - both raised to
0-1000, min unchanged since both are always-positive delta/tolerance
values, not price caps, so negative doesn't apply there.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@springfall2008
springfall2008 merged commit 4d4836e into main Aug 20, 2026
2 checks passed
@springfall2008
springfall2008 deleted the fix/widen-price-config-ranges branch August 20, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Car_charging_plan_max_price limited to -99..99

2 participants