Repository navigation
Conversation
…ce (WP6) Base load = house minus the configured devices; profiles per day type and quarter hour with exponential smoothing (half-life 21 days), clipped z-score, shrinkage for thin day types, optional temperature term, residual quantiles, cold start. forecast.load gains optional workday/weather entity refs (additive in v2, carried through by the wizard form); workday.check_date joins the read-only actions; accuracy bookkeeping can score the load forecast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
… (WP6) GET /api/v1/forecast/load; load_profile accuracy in the nightly job and in /forecast/accuracy; HaLoadReader (workday state, workday.check_date, weather temperature and weather.get_forecasts hourly); the service is rebuilt on forecast/devices changes and refits after the history rebuild. Demo: deterministic workday sensor and weather entity, battery model. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…arget functions (WP7) Windows rest_of_today/night/next_day/bridge anchored on the next sunset; net energy quantile from the learnt relative errors per window and weather class after min_history_days, else from the source quantiles (two-piece normal, PV and load independent); morning_buffer_pct and evening_target_pct with structured reasons, manual limits and max SoC always winning, prefer_full = max SoC. Hypothesis and scenario tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…k view (WP7) Samples per anchor day from the forecasts at 06:00 (rest_of_today) and 18:00 (night, next_day, bridge) against measured PV and base load, kept 365 days in learned_param net_error; GET /api/v1/forecast/risk with the windows, morning buffer, evening target, reasons and distribution source. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…and targets (WP6, WP7) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…rning and one quantile for the morning buffer (WP7 review) - M4: core.battery.effective_reserve_pct (ADR-0013 decision 3) is the floor of evening target and morning buffer; never below the site min SoC. - M5: a PV forecast without a band uses a default relative band per weather class (default_band, UNVERIFIED constants) until learnt. - M3: a window is learnt only if the PV and load forecasts cover it; without a PV forecast only the night. Coverage now counts the window's slots (a series that ends early no longer looks complete). - m2: rest_of_night (now to sunrise) instead of mixing it into rest_of_today; m3: anchors sunrise + 1 h and sunset - 1 h; m4: clipped daytime windows are dropped (flags from the PV nightly job). - m7: the morning buffer uses one quantile over the new day_and_night window against the median night need (no comfort factor). - n1: reasons name the configured risk level; n3: evening_at documented. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…and use only full temperature days (WP6 review) - M1: Home Assistant evaluates the workday sensor and workday.check_date for the date plus days_offset; the sensor's state is placed on today + offset and check_date is asked for d - offset. - m6: the cached answers carry a fingerprint (entity id, workdays, excludes, days_offset); a change drops them. - m5: the temperature term shifts a forecast day only with >= 20 hours of recorded or forecast temperatures. - n4: the demo workday sensor uses the scenario's local date. - m8: tests for the offset, the joint heating/cooling regression and a forecast over the DST day. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
… devices out of the base load profile (WP6 review M2) The statistics rebuild also fetches every device's power sensor (mean, W) into device.<id>.power_w. Quarter hours where a device has no measurement are left out of a day type's profile once it has 7 fully measured days; before that they are kept and the day type is flagged (unmeasured_in_profile in GET /forecast/load). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
…elvin (review n2) Home Assistant always sets temperature_unit on a weather entity and converts the forecasts to it (weather/entity.py state_attributes, _convert_forecast, core 5cfe9aad); UnitOfTemperature includes K, which is now converted instead of dropped. Research note records it and the verified workday offset. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VHXsfH6PkT62o9idByAd6e
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 #29 (PR 4-D). Die Basis wird nach dem Merge der Vorgänger umgestellt.
Was
WP6 und WP7 aus
docs/plans/phase-4.md.WP6 – Lastprognose (
suncore/forecast/load.py,load_service.py,stats.py,days.py):workday-Sensor: Zustand für heute,workday.check_datefür andere Tage.days_offsetwird ausgeglichen. Der Cache trägt einen Fingerabdruck der Sensor-Konfiguration.temperature_unitist am HA-Quelltext geprüft, °C/°F/K. Wirkt nur für fast volle Prognosetage.GET /api/v1/forecast/load?hours=48.WP7 – Risikomodell (
suncore/forecast/risk.py,risk_learning.py):rest_of_night,rest_of_today,night,next_day,bridge(Nacht und nächster Tag als ein Quantil) undday_and_night.default_band,UNVERIFIED).Reason:net_energy_quantilemorning_buffer_pct: ein Quantil über Tag und Nacht, ohne doppelte Vorsichtevening_target_pct: Reserve + Nacht, mitbridge_next_dayzusätzlich der Fehlbetrag des nächsten Tageseffective_reserve_pct = max(Min-SoC der Anlage, Reserve + Drift)(ADR-0013 §3, neu incore/battery.py).goals.battery_targetgilt als Untergrenze des Abendziels (vom Maintainer bestätigt); die zeitgebundene Bedingung kommt in 4-F.prefer_fullsetzt den Morgenpuffer auf Max-SoC.GET /api/v1/forecast/risk.Warum
Plan §0, aus dem zusammengeführten Konzept: Der Akku soll die Nacht und möglichst auch einen schlechten nächsten Tag abdecken. Der Puffer wird aus dem gelernten Prognoserisiko berechnet, mit „vorsichtig“ als Standard. Der Planer (4-F) liest diese Werte direkt.
Wie getestet
./scripts/check.shgrün: 3807 Python-Tests, 219 Frontend-Tests, Abdeckung 96 %. markdownlint ohne Fehler.Hypothesis-Tests:
Szenarien:
Weitere Tests:
check_date.Laufzeit: Ein Refit dauert im amd64-Container 118–163 ms, die Prognose etwa 1 ms. aarch64 ist noch nicht gemessen.
Risiken
UNVERIFIED). Das betrifft auch die Standard-PV-Bänder.workday.check_dateist neu auf der Read-only-Allowlist, am HA-Quelltext alsSupportsResponse.ONLYohne Zustandsänderung geprüft. Die Aufrufe laufen über den Ratenbegrenzer, höchstens 12 je Lauf.feat-Commits wegen der Nutzungslimits. Squash-Merge empfohlen.Safety-Review
n/a laut Reviewer: Kein Geräte-Schreibpfad. Allowlist, Grenzregeln und Ratenbegrenzer halten. Der Last-Task wird beim Stoppen erst nach der Gerätefreigabe abgewartet. Die Reserve-Untergrenze folgt ADR-0013; 4-G nutzt dieselbe Funktion im Gate.
Checkliste
enundde(Reason-Texte nennen die eingestellte Risikostufe)temperature_unit,workdaydays_offset)docs/STATUS.mdaktualisiertUNVERIFIEDOffene Fragen an den Maintainer
Beantwortet am 2026-10-23:
goals.battery_targetbleibt Untergrenze des Abendziels, und ein Feiertag unter der Woche zählt anfangs wie ein Wochenende.Für die beiden neuen Fragen gilt ohne Antwort der Standard:
Morgenpuffer: Verbraucher haben Vorrang, sobald nach heute und der kommenden Nacht beim gewählten Risiko noch mindestens eine weitere durchschnittliche Nacht übrig ist. Standard: so lassen.
Standard-PV-Bänder, solange eine Quelle kein P10/P90 liefert:
Dich betrifft das nicht, Solcast liefert P10/P90. Standard: so lassen.
UNVERIFIED:workday.check_dateüber den Supervisor-Proxy.Generated by Claude Code