Repository navigation
feat(config): read grid import and feed-in prices from the payload - #9
Merged
Merged
Conversation
When a transformer node carries grid_import_price or grid_export_price (EUR/kWh), they set the import and export price of its grid trade (EUR/MWh). A feed-in price also limits export to the transformer rating. Without the properties the import price stays 300 EUR/MWh and export stays unpaid, so existing payloads translate unchanged. Mapping version 1.6.0. Refs #8
jravani
commented
Nov 1, 2026
jravani
left a comment
Member
Author
There was a problem hiding this comment.
Verdict: ready to merge into jay/enerplanet-integration; no blockers.
go test -race ./... passes at 8139d75, and forward and reverse runs on the example with prices added match the PR description.
Non-blocking:
- suggestion: an explicit import price of 0.30 EUR/kWh is not restored by reverse (config line 178)
- question: a zero feed-in price caps export at the rating, a missing one does not (config line 181)
Reverse treats 300 EUR/MWh as the absent placeholder, so a payload that sent grid_import_price 0.3 comes back without it. The forward job is unaffected.
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.
Refs #8.
A transformer node can now carry
grid_import_priceandgrid_export_pricein EUR/kWh. They set the import and export price of itstrade{grid_$k}in EUR/MWh, and a feed-in price also limits export to the transformer rating. A node without them translates exactly as before: 300 EUR/MWh import and an unpaid export sink.Example, a 400 kVA transformer with
"grid_import_price": 0.34, "grid_export_price": 0.079:Changes:
config/enerplanet-to-meme.json: transformer trade rules, mapping version 1.6.0 (1.5.0 is the PV parasitic efficiency on the base branch).pkg/t1k/mapping_test.go:TestMappingGridPricescovers a node with both prices, the reverse restoring them, and a node without them.docs/mappings/enerplanet-to-meme.mdandCHANGELOG.md: the field table and the entry.Checks:
TestMappingGridPricesfails without the mapping change (import.price = 300, want 340;export.pricemissing) and passes with it.make test-race,go vetandgofmtpass.make golden-updateleaves the golden files unchanged: the example payload carries no prices.