Skip to content

energy charts: net/brutto and tax field#3394

Open
LKuemmel wants to merge 2 commits into
openWB:masterfrom
LKuemmel:electricity_tariff
Open

energy charts: net/brutto and tax field#3394
LKuemmel wants to merge 2 commits into
openWB:masterfrom
LKuemmel:electricity_tariff

Conversation

@LKuemmel
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds support for Energy-Charts flexible tariff pricing to distinguish net vs. gross prices by applying a configurable VAT/tax factor, and migrates existing configurations to include the new fields.

Changes:

  • Extend EnergyChartsTariffConfiguration with net and tax fields (defaults: net, 19%).
  • Apply tax when net=False while converting Energy-Charts API prices.
  • Add a datastore migration (v124) to backfill missing net/tax for existing Energy-Charts provider configs, plus unit tests for net/gross parsing.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
packages/modules/electricity_pricing/flexible_tariffs/energycharts/tariff.py Applies VAT/tax multiplier when configured for gross prices.
packages/modules/electricity_pricing/flexible_tariffs/energycharts/config.py Adds net/tax config parameters with defaults.
packages/modules/electricity_pricing/flexible_tariffs/energycharts/tariff_test.py Adds tests covering net prices and gross prices with tax.
packages/helpermodules/update_config.py Bumps datastore version to 124 and migrates Energy-Charts provider configs to include net/tax.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -27,7 +27,10 @@ def create_request_url(config: EnergyChartsTariffConfiguration) -> str:
def parse_response(config: EnergyChartsTariffConfiguration, raw_prices: dict) -> Dict[str, float]:
prices: Dict[int, float] = {}
@LKuemmel LKuemmel added this to the 2.2.1 milestone May 26, 2026
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.

2 participants