Repository navigation
feat(automations): check adopted suggestions and report season drift - #300
Merged
Merged
Conversation
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…the season Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The season denominator of the effect now comes from the adoption date, so it holds once the baseline day files are pruned. The new EffectStore keeps one measured effect per rule or scenario that came from a learned suggestion, with its baseline and the numbers shown with it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nd in the band Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ason Nightly, each learned entry keeps one standardised drift value per day, the difference between the adopted and the current suggested values in spreads. A CUSUM over the last 28 days raises a season_shift finding with replacing fixes once the drift is beyond the slack. A candidate that moved its switch time is matched by its ID prefix. Drift findings are reported with the rule check, never on the band. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…laced A replaced rule points at a candidate the gate does not show, so its values were missing. The effect runner now adds the values of every candidate that is not shown, the shown ones win. The season drift finding also names the matching candidate in its params. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Add the Automations: Learning page with the band, rule marks, minimum data per kind, learned values, effect and season drift, recording and privacy. Add it to the navigation under Automations, and add Monitoring after Device map. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Values that move because of the adoption itself, such as the today value of a threshold or the share of an overridden rule, made a false season shift. Each kind now drifts only on its own seasonal values. Other kinds never drift. An ops based replace fix renews learned_from with the suggestion of its finding, so the mark follows the rule after the drift is applied. The threshold value gets the catalog text Schwelle and Threshold. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A suggestion without a unit has no measure to compare, so its effect shows only the override count (effect.count_only), not the missing comparison data. Such an entry stays off the band. The assistant origin is set only when the template is opened, so a template picked by hand afterwards gets no learned_from. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The surplus detector stopped at any surplus rule of the device, so the window suggestion of an adopted rule never came back and its season drift could not be reported. Now a rule adopted from this window suggestion does not silence the detector, while every other surplus rule still does. A suggestion adopted into a rule or scenario counts as applied for every kind, so the gate and the suggestions band no longer show it as a tile. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The demo now shows every state of the effect proof (waiting, no baseline, count only, ok) and every kind of season drift (switch time, away standby, threshold, surplus window). Adopted rules and the scenario carry learned marks with an adoption age in days, stamped from now by the demo script. The dehumidifier rule shows one reversal among four switch-offs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The effect runner judged the season drift on its first run, before the daily round had produced the learned values. After every restart the drift findings disappeared until the next day. The drift now waits for a complete daily round and is judged once per round. A night without a candidate list leaves a stored drift untouched. In the demo, one extra daily round runs after the first round, because the learned values exist only after it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The prior-year demo weeks carry load and PV, so the season correction of the effect has figures to work with. The test pins that the demo shows one sure effect beside an estimate. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Both surplus templates create a scenario, so the drift fix replaces a scenario and not a rule. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…t in hand switches The dryer was a rule, which the assistant never creates for a window suggestion, so its drift fix added a scenario beside the rule. A follow rule shows a measured effect in hand switches per week. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…x does Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The effect tiles sit behind the expander, so the tour step for them needs a target that opens the band. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
An effect validates an adopted suggestion and asks for nothing, so it leaves the suggestion band. Monitoring lists the measured results under their own filter, with the confidence and a step to the rule. The rule marks stay. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Squash-merge commit message
Highlight translations
Tour
{ "*": { "steps": [ { "panel": "monitoring-panel", "target": "monitoring-effect", "device": "any", "need": "view_monitoring", "open": [ "monitoring-effect" ], "title": { "en": "Results check", "de": "Erfolgskontrolle" }, "text": { "en": "After you adopt a suggestion, Monitoring shows the value before and since under Results check. It appears after the first full week.", "de": "Nach dem Übernehmen eines Vorschlags zeigt das Monitoring unter Erfolgskontrolle den Wert vorher und seitdem. Das beginnt nach der ersten vollen Woche." } }, { "panel": "automations-panel", "target": "rule-effect", "device": "any", "need": "view_automations", "open": [ "automations-rules" ], "title": { "en": "The mark on the rule", "de": "Die Marke an der Regel" }, "text": { "en": "The rule carries the same result. When its times or values move with the season, the mark warns and offers an adjustment.", "de": "Die Regel trägt dasselbe Ergebnis. Wandern ihre Zeiten oder Werte mit der Jahreszeit, warnt die Marke und bietet eine Anpassung an." } }, { "panel": "monitoring-panel", "target": "monitoring-learned", "device": "any", "need": "view_monitoring", "open": [ "monitoring-learned" ], "title": { "en": "Learned values", "de": "Lernwerte" }, "text": { "en": "Monitoring lists what the node has learned. Rules can use these values.", "de": "Das Monitoring listet, was der Node gelernt hat. Regeln können diese Werte nutzen." } } ] } }Summary
Adopted suggestions are now checked: rules show their result, Monitoring lists the measured ones under Results check, and rules warn when their values drift with the season. Merge danger: two-way door, but the rule schema forbids unknown fields, so the dashboard needs the new automation service schema to save a rule adopted from a suggestion (a node with mixed versions is untested). Not covered by the demo and only by tests: the jump from Monitoring to a scenario.
Checks
scripts/dev/check_tracked_secrets.shis clean.