Skip to content

energy charts: net/brutto and tax field - #3394

Merged
LKuemmel merged 1 commit into
openWB:masterfrom
LKuemmel:electricity_tariff
Jun 9, 2026
Merged

LKuemmel merged 1 commit into
openWB:masterfrom
LKuemmel:electricity_tariff

Conversation

@LKuemmel

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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
@LKuemmel
LKuemmel force-pushed the electricity_tariff branch from 4ccd6c5 to fdfc4da Compare June 9, 2026 09:43
@LKuemmel
LKuemmel merged commit 365aac5 into openWB:master Jun 9, 2026
1 check passed
@LKuemmel
LKuemmel deleted the electricity_tariff branch June 9, 2026 09:47
ndrsnhs pushed a commit to ndrsnhs/core that referenced this pull request Aug 24, 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