feat(whatif): edf tariffs - #4406
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds EDF import/export tariffs to the What-If annual tariff catalogue and ensures the “baseline tariff (no PV/battery)” selection correctly carries dno_region when it depends on a templated {dno_region} URL, preventing config validation failures.
Changes:
- Added EDF import tariffs (Go Electric; Empower Fixed) and EDF export tariffs (15p; 18p) to the built-in tariff catalogue.
- Updated the tariff catalogue unit test to include the new EDF tariff IDs.
- Propagated
tariff_dno_regionintobaseline_tariffwhen building annual What-If config from the web form.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| apps/predbat/web_annual.py | Copies tariff_dno_region into baseline_tariff to support templated baseline URLs. |
| apps/predbat/tests/test_tariff_catalogue.py | Extends expected import/export tariff ID lists to include EDF entries. |
| apps/predbat/tariff_catalogue.py | Adds EDF Kraken API base URL and new EDF import/export catalogue entries. |
The unmatched-tariff case renders a flat export rate that matches no EXPORT_TARIFFS entry, to check it falls back to "flat Np" rather than blanking. It used 15.0p, which this branch's new EDF Export entry now claims, so the renderer correctly named it and the fallback assertion failed. Move the fixture to 21.5p, which no catalogue entry uses, and say so in a comment. Co-Authored-By: Claude Opus 5 (1M context) <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.
Sources:
https://www.edfenergy.com/solar/solar-tariffs
https://www.edfenergy.com/energy-efficiency/smart-export-tariff#one
includes a fix for the "Import tariff without PV or a battery" if it use a URL that has a dno_region