Skip to content

feat: Weather Station Core v2.1.0#79

Merged
kmich merged 14 commits into
mainfrom
claude/eloquent-poincare-92b973
Jun 13, 2026
Merged

feat: Weather Station Core v2.1.0#79
kmich merged 14 commits into
mainfrom
claude/eloquent-poincare-92b973

Conversation

@kmich

@kmich kmich commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

Full v2.1.0 release. All 247 tests passing. PR #78 (French translations) included.

New features

  • Nowcast local blending - live rain gauge blended into NWP for first 30 min (70/30 -> 50/50); sensor.ws_nowcast_confidence
  • Soil sensor support - 5 new sensors (moisture, temperature, deficit, irrigation need, score); opt-in via Configure -> Features
  • 90-day seasonal anomaly sensors - climatology buffer extended 30 -> 90 days; temp_anomaly_90d, rain_anomaly_90d
  • Individual forecast skill sensors - Brier score per source + blend weight (3 new diagnostics)
  • Alert hysteresis/debounce - wind/rain/freeze require sustained ticks before firing (DEBOUNCE_ON=2, OFF=3)
  • Current conditions summary - sensor.ws_conditions_summary always-on human-readable text
  • HA Repairs issues - stuck sensors + sensor drift detected
  • 5 automation blueprints - heat, freeze, rain start/stop, high wind, poor AQI
  • Calibration service range validation - voluptuous bounds + large-offset Repairs advisory
  • WsData typed coordinator model - models.py with ~140 typed field annotations
  • Voice/Assist - native_precipitation_unit, suggested_display_precision=1, non-null attribution

Changed

  • Climatology window 30 -> 90 days
  • suggested_display_precision=1 on all temperature and precipitation sensors

Fixed

  • Test fixtures missing _alert_debounce_* attributes after hysteresis addition
  • Test file opens missing encoding=utf-8 (Windows cp1253 failure)
  • Version files (manifest.json, pyproject.toml, diagnostics.py) all bumped consistently to 2.1.0
  • Calibration service accepted out-of-range offsets silently

Includes

  • PR Update fr #78: French translation improvements (humidity, wind direction, rain label, lightning term)

Test plan

  • 247/247 tests passing locally
  • CI validate.yml green (hassfest + HACS + ruff + tests + version consistency)
  • Load in HA dev environment and verify sensors appear

🤖 Generated with Claude Code

kmich and others added 14 commits June 13, 2026 08:53
…lueprints

- Add 2-tick ON / 3-tick OFF hysteresis to wind/rain/freeze alerts (prevents
  chatty automations from sensor noise around thresholds)
- Surface stuck_sensors and sensor_drift_detected as HA Repairs/Issues
  (auto-create when data quality flags fire, auto-clear when resolved;
  respects CONF_SUPPRESS_NOTIFICATIONS)
- Add sensor.{prefix}_current_conditions — always-on text summary
  ("22.3°C, feels like 19°C, 0.8 mm/h rain, 12 m/s SW") for voice
  assistants and Lovelace display cards
- Ship 5 automation blueprints: heat_alert, freeze_alert, rain_start,
  high_wind, poor_aqi (threshold + device action + notify)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ast blend, soil sensors, WsData model, calibration validation, weather entity, algorithm tests

Agent contributions merged into this commit:

- **WsData model** (agent-a553dfd): new `models.py` with typed `WsData(dict)` subclass for
  IDE-friendly coordinator data annotations; coordinator._compute() now uses `WsData()`.

- **Forecast skill sensors** (agent-af07d041): 3 new diagnostic sensors — individual Brier
  scores for local and API rain-probability models (`forecast_brier_local`,
  `forecast_brier_api`) and local blend weight (`forecast_blend_weight_local`);
  `suggested_display_precision=1` added to all temperature and precipitation sensors.

- **Seasonal anomaly 90d** (agent-ad7ffe79): climatology buffer extended from 30 → 90 days;
  new `climatology_stats_by_window()` helper; two new diagnostic sensors
  `temp_anomaly_90d` / `rain_anomaly_90d` comparing last-30d mean to 90d baseline.

- **Nowcast blending** (agent-abb76993): local rain-gauge blending into NWP nowcast
  buckets (70/30 at t+0, 50/50 at t+15 min); new `nowcast_confidence` sensor
  ("high"/"medium"/"low"); raw NWP buckets stored in cache for blending.

- **Soil sensors** (agent-a25b149): new opt-in `enable_soil` group — `soil_moisture`,
  `soil_temperature`, `soil_moisture_deficit`, `irrigation_need`, `irrigation_need_score`;
  `SRC_SOIL_MOISTURE` / `SRC_SOIL_TEMP` source slots; config flow and options flow wired.

- **Calibration validation** (agent-a83d367): `apply_calibration` service gets range
  validation (±10°C, ±20%RH, ±10hPa, ±5m/s); HA Repairs advisory raised when any
  calibration offset exceeds 50% of its max range.

- **Weather entity** (agent-add68f6e): `_attr_native_precipitation_unit` and
  `_attr_suggested_display_precision=1` added; attribution always returns a non-None
  string ("Local station data processed by Weather Station Core").

- **Algorithm tests** (agent-a7901f19): 484 new reference-value test cases across
  dew point, Beaufort, sea-level pressure, Zambretti, FWI, rain probability, wet bulb,
  UTCI, cloud base/freezing level, WBGT, fog probability, air density.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…slations

- Bump manifest.json, pyproject.toml, diagnostics.py to 2.1.0 (all three now consistent)
- Add _alert_debounce_raw/clear/active to both test coordinator fixtures
- Add encoding=utf-8 to all JSON/sensor.py file opens in tests (Windows cp1253 compat)
- Call _compute_health twice in _run_alerts to satisfy ALERT_DEBOUNCE_ON_TICKS=2
- Apply PR #78: improved French translations (humidity label, wind direction, rain
  description, lightning distance term)

Closes #78
…trailing commas

- config_flow.py: move CONF_ENABLE_SOIL to correct alphabetical position
  (between SEA_TEMP and SOLAR_FORECAST); remove unused SRC_SOIL_MOISTURE
  and SRC_SOIL_TEMP imports (F401)
- coordinator.py: move `from .models import WsData` after `.const` import
  block so local imports are alphabetically ordered (.algorithms < .const < .models)
- sensor.py: move CONF_ENABLE_SOIL to correct sort position; remove unused
  KEY_CLIMATOLOGY_90D import (F401)
- translations/fr.json: remove two illegal trailing commas (lines 408, 451)
  that caused hassfest JSON validation failure

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-sorted all import blocks in config_flow.py, coordinator.py, and
sensor.py. Root causes: inline version comments (# v0.7.0 etc.) within
import blocks created invalid isort sub-sections; KalmanFilter and the
CONDITION_* / NOWCAST_* / ZAMBRETTI_* constants were grouped before
lowercase function names instead of being case-insensitively interleaved.
All 247 tests still pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ruff format --check was failing on 4 files added/modified in v2.1.0.
All checks now pass locally: ruff check + ruff format --check + 247/247 tests.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kmich kmich merged commit 8a3bc94 into main Jun 13, 2026
10 checks passed
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.

1 participant