fix(config): widen currency-scoped price ranges for non-GBP markets - #4615
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4614.
car_charging_plan_max_pricewas 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 bymanual_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..5→0..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..10→0..1000(p). Same reasoning, min stays 0 for the same reason.Checked every other currency-denominated
input_numberinconfig.pyfor the same issue -metric_min_improvement*,metric_battery_cycle,metric_future_rate_offset_import/exportare 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 --quickpasses./run_pre_commitpasses🤖 Generated with Claude Code