Repository navigation
Conversation
…e (WP4) Template-driven price adapter (action or attribute source, list or mapping shape, per-MWh conversion, native 15/60-minute grid from the data, gaps as None, DST safe), templates for Tibber, Nord Pool, ENTSO-E, EPEX Spot, Octopus Energy and a generic price list, fixed and HT/NT sources, the price formula on spot-only sources, export fixed/tiered/none, the region's negative-price rule, and a TariffService that keeps the prices fresh, stores them in timeseries.db and serves them on GET /api/v1/prices. The simulator answers tibber.get_prices through the same template path; new scenario negative_prices. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…es (review M1-M3) M1: a failed fetch consumes the dirty flag and a change triggers at most one attribute fetch per 30 s, so a failing attribute source no longer refetches on every poll. M2: a fetch without any known price is a failure; unknown slots of a fetch are filled from the earlier data and reported as quality.carried_slots. M3: the old tail starts at the next whole old slot (no overlap when the grids differ); the series assembly for storing runs inside the try block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
… list-end gaps (review M4, m2, m4) M4: pynordpool/HA source show that `date` is the CET delivery day (deliveryDateCET); the template gets the additive `date_tz` field (schema changelog), request dates are computed in that zone and the "tomorrow covered" test uses the market's end of day, so it terminates west of CET too. Research note with repo@sha paths in docs/research/integrations.md. m2: a source in another currency than the region (sensor unit, template unit, `currency` action field) raises CurrencyMismatchError (en/de key). m4: core/series.py segments_from_points (4-A code): at the end of a list a gap that is a multiple of the running step is a gap (None), not a resolution change; the rhythm needs a confirming distance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…its (review m1, m3, m5, n1-n5) m1: system check warns about a spot-only import price without a price formula; PriceReport carries price_includes and formula_missing; PUT /config/tariff rejects a missing required request field of the template (422, en/de key); STATUS records that the 4-F planner must refuse spot_only prices without a formula. m3: the three tariff settings are documented as expert environment variables in both app DOCS.md files (no app options); plan question wording fixed. m5: plan question on the per-plant opt-out of the section 51 EEG rule (commissioning date). n1: architecture table and diagram: tariff no longer depends on ha. n2: EPEX market template text. n3: ambiguous-series names are joined before ICU. n4: adapters docstring. n5: tests use end_price, apply is marked as a deprecated alias. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Resolves runtime.stop (tariff task joins the storage tasks that are awaited after the devices are released) and STATUS; the fake-price test uses rate-limit sub-keys now that the fake is rate limited like the real connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
5 tasks done
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.
Gestapelt auf #26 (PR 4-B), das wiederum auf #25 (PR 4-A) aufbaut. Die Basis wird nach dem Merge der Vorgänger umgestellt.
Was
WP4 aus
docs/plans/phase-4.md, Paketsuncore/tariff/:engine.py,parse.py):end − startoder aus dem Abstand der Zeitstempel; gemischte 15/60-Minuten-Raster werden zu Segmenten.None; Sommer- und Winterzeit (23/25 h) sind abgedeckt.series_key).unverified-Listen, Conformance-Szenarien):tibber.price(aktualisiert),nordpool.price,entsoe.priceundentsoe.price_mwhepex_spot.total_priceundepex_spot.market_price,octopus_energy.rates,generic.price_listsources.py).spot_only), nie auf Endpreisen.deist die Einspeisevergütung 0 in Slots mit negativem Preis.TariffService:timeseries.dbgespeichert.GET /api/v1/prices?hours=48(1–72 h) mit Quelle, Aktualität, Qualität,price_includesundformula_missing.PUT /config/tariffprüft Pflichtparameter der Vorlage (z. B. Nord Poolconfig_entry).dateist der CET-Liefertag (aus dem HA- und pynordpool-Quelltext abgeleitet, belegt indocs/research/integrations.md). Neues additives Vorlagenfelddate_tz.tibber.get_pricesüber denselben Vorlagenpfad; neues Szenarionegative_prices.core/series.py): Eine Lücke direkt vor dem letzten Punkt wird nicht mehr mit dem Nachbarwert gefüllt.Warum
Der Planer (4-F) braucht für 24–48 h verlässliche Import- und Exportpreise im 15-Minuten-Raster, aus den Integrationen, die der Nutzer schon hat.
Wie getestet
./scripts/check.shnach dem Zusammenführen mit 4-B: ruff und mypy grün. pytest: 3522 bestanden, 1 Fehler intests/sim/test_fake_prices.py; der Test ist korrigiert (siehe unten) und einzeln wieder grün,check.shlief danach nicht noch einmal komplett. Frontend 219 Tests; markdownlint ohne Fehler.Nonebehält die alten Daten.Risiken
end_field,date_field,params,date_tz,response_pathmit*. Neu sind die optionalen Felderrole_entities,action_params,series_keyundprice_includesintariff.import. Alte Dokumente laden unverändert.nordpool.get_prices_for_datesteht neu auf der Read-only-Allowlist. Am HA-Quelltext geprüft:SupportsResponse.ONLY, kein Zustandswechsel.Safety-Review
n/a laut Reviewer: kein Geräte-Schreibpfad. Die Grenzregeln sind erweitert und grün; das Paket
tariffimportiert nurcoreundtemplates, und Aktionen ruft nursuncore.app.adaptersauf. Der Tarif-Task wird beim Stoppen wie die Speicher-Tasks erst nach der Freigabe der Geräte abgewartet.Checkliste
enunddeDOCS.md: Experten-Umgebungsvariablentariff_*;architecture.md)docs/STATUS.mdaktualisiertdocs/research/integrations.md, Offenes alsUNVERIFIEDOffene Fragen an den Maintainer
config_entry: Reicht die manuelle Eingabe in Phase 4, oder soll SunCore sie aus der Registry lesen?tariff.import(role_entities,action_params,series_key,price_includes): einverstanden?UNVERIFIED:tibber.get_pricesISO-Zeiten mit Offset live annimmtdateals CET-Liefertag liveGenerated by Claude Code