Skip to content

Release 2.8.1: tick-based sampling, runtime_data, shared flow steps, CI cleanup - #156

Merged
kmich merged 5 commits into
mainfrom
claude/cloudcredits-usage-o96iez
Sep 25, 2026
Merged

kmich merged 5 commits into
mainfrom
claude/cloudcredits-usage-o96iez

Conversation

@kmich

@kmich kmich commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Description

Release 2.8.1: four follow-ups from the 2.8.0 review plus the version bump, one commit each.

  1. Per-sample state advances on the 60 s tick only. Recomputes triggered by source updates or fetches still show the latest reading but no longer advance the rolling histories, rain Kalman filter, wind smoothing, degree-day means, spike/drift buffers, alert debounce or solar learning. The coordinator's redundant built-in poll is removed. Drift detection gets a real 72 h window and needs 24 h of data (a morning warm-up used to read as drift).
  2. CI consolidated into validate.yml. ci.yml and hacs.yml duplicated its jobs.
  3. Coordinators on entry.runtime_data instead of hass.data[DOMAIN]. Also fixes setup offering a custom-prefix station's own sensors as sources.
  4. Config and options flows share the upload and indoor-room steps (flow_steps.py). Fixes setup never asking for OWM Stations / Windy / CWOP credentials after Weathercloud. The options flow now trims and validates input like setup does.
  5. Release 2.8.1: version bump in manifest.json / pyproject.toml and CHANGELOG section.

Related Issue

None; follow-ups from the 2.8.0 code review.

How Has This Been Tested?

  • pytest tests/: 434 passed, including new test_sampling.py, test_runtime_data.py and test_flow_steps.py.
  • ruff check / ruff format --check clean.
  • Not tested against a live Home Assistant instance.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist:

  • My code follows the code style of this project
  • I have updated the documentation accordingly (if needed)
  • I have added tests to cover my changes (if applicable)
  • All new and existing tests passed
  • I have updated CHANGELOG.md with my changes

Every source-sensor update recomputed all derived values and also advanced
the rolling histories, rain Kalman filter, wind smoothing, degree-day
means, spike/drift buffers, alert debounce and solar-factor learning, so
their behaviour depended on how often the station reported. That state now
advances only on the 60 s tick; recomputes in between show the latest
reading without storing it. The redundant built-in coordinator poll is
removed.

Drift detection now uses a real 72 h window and needs 24 h of data before
judging a slope, so the diurnal cycle no longer reads as drift.
ci.yml and hacs.yml duplicated validate.yml's hassfest, HACS, lint and
test jobs, so every push and PR ran them twice.
Replaces hass.data[DOMAIN]. Services now resolve coordinators from loaded
entries, and setup auto-detection excludes the derived sensors of every
configured prefix (it looked for a non-existent coordinator attribute, so
only sensor.ws_* was skipped).
The two flows carried hand-maintained copies of the eight upload-credential
steps and the indoor-room steps. The copies had drifted: setup hard-coded
a different next-step list per step, so after Weathercloud it never asked
for OWM Stations, Windy or CWOP credentials. Both flows now use one
implementation driven by an ordered service table; step IDs and
translations are unchanged.
@kmich
kmich merged commit 48473ab into main Sep 25, 2026
7 checks passed
@kmich
kmich deleted the claude/cloudcredits-usage-o96iez branch October 3, 2026 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants