Conversation
…es modules Forward-ports the pricing_modules branch (PRs #210 and #237) onto current main. Introduces a pluggable Pricing module system with multi-module aggregation policy, a /api/getPricing HTTP endpoint, background task queuing from Policy on each enforcement cycle, and three initial modules: StaticPricing (config-based flat rates), aWATTarPricing (Austrian spot market), and PVPCesPricing (Spanish PVPC regulated tariff with cheapest-window scheduling support). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add Tuple import from typing module - Replace tuple[bool, str] with Tuple[bool, str] for Python 3.9 compatibility - Replace tuple[bool, str, dict] with Tuple[bool, str, dict] - Fixes TypeError: 'type' object is not subscriptable in Python 3.9
…nfig - Dashboard: add import/export price display to showStatus (shown only when Pricing modules are active); poll /api/getPricing every 30s via jsrefresh - Policy: expose getImportPrice() and getExportPrice() in policyValue() so pricing conditions can be used in any policy match/value field - Config: add maxImportPrice to config section; add full pricing module configuration block (Static, aWATTar, PVPCes) with commented examples; add commented emergency policy examples to stop charging when import price exceeds configured maximum or when export price exceeds import price Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Update PVPCesPricing cache comment to clarify daily update behavior - Change default multiPrice policy from 'add' to 'first' in TWCMaster - Improves pricing module documentation and default behavior
- Update config.json default multiPrice policy to 'first' - Add rate limit handling in aWATTarPricing to respect 15-minute cache - Update lastFetch timestamp even on parse errors to avoid excessive API calls
- tests/unit/conftest.py: fix namespace package shadowing so TWCManager.* imports resolve to lib/TWCManager/ rather than the root launcher script; this lifts the entire unit suite from 21 to 252 passing tests - tests/unit/test_pricing.py: 28 tests covering StaticPricing (enabled/ disabled paths, import/export prices, capabilities), aWATTarPricing (cache enforcement, Eur/MWh conversion, connection error handling), PVPCesPricing (hourly price selection, cache behaviour, token headers, cheapest-window scheduling including cross-midnight), and TWCMaster price aggregation with both 'first' and 'add' multiPrice policies - docs/modules/Pricing_Static.md: Static Pricing module documentation - docs/modules/Pricing_aWATTar.md: aWATTar Pricing module documentation - docs/modules/Pricing_PVPCes.md: PVPCes Pricing module documentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This was referenced Apr 13, 2026
Test Results 8 files + 2 8 suites +2 4m 37s ⏱️ + 1m 11s For more details on these failures and errors, see this check. Results for commit 1701ced. ± Comparison against base commit 795d647. |
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.
Pricing Module integration (redux)