Added support for EEGs#345
Open
GenFlogi wants to merge 1 commit into
Open
Conversation
GenFlogi
marked this pull request as ready for review
May 24, 2026 21:45
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.
Energiegemeinschaft: grid/community consumption split
Adds EEG consumption side support for #310. Supersedes the approach in #343.
What
For Zählpunkte participating in an Energiegemeinschaft (EEG), additionally
import the grid/community consumption split as two new external
statistics, alongside the existing total:
wnsm:<zp>— unchanged (total consumption, V001/V002)wnsm:<zp>_grid— grid draw, role G001 (Restnetzbezug)wnsm:<zp>_eeg— supplied by the community, role G003 (Eigendeckung)G001 + G003 = V002(per the role mapping established by @tschoerk andconfirmed by @AndiVienna91 in #310). Users wire
_grid/_eeginto theEnergy Dashboard as two grid-consumption sources with separate prices.
Auto-detection, no config flow
Participation is detected via the existing
user/zaehlpunkte/{gp}/{zp}/zaehlwerkeendpoint: aneagTeilnahmenentrywith
status == "A"whose date range covers today. Detection failures areswallowed to debug — they can never break a normal update.
Testing
ZP (no
SmartmeterQueryError), three importers ran,_grid/_eegstatistics created,
G001 + G003 ≈ V002.Scope & honest caveats
issue consensus is solid only on G001/G003; W-M-B's feed-in roles are
ambiguous (U001 vs U01T).
find_valid_obis_datais a differentendpoint/concern; deliberately not modified (minimality).
and
geschaetzt; the incremental importer won't re-pull revisedvalues, so the most recent weeks of
_grid/_eegcan differ slightlyfrom the WN portal. Pre-existing incremental behaviour, more visible
for EEG.
dateTo < today; due to WN'sdata lag the final stretch may never import. A
dateTo + gracewindowis a possible future refinement.