Repository navigation
v1.22.8 — Accurate compressor runtime & smarter cold-snap advice
v1.22.8 — Accurate compressor runtime & smarter cold-snap advice
⭐ If this project helps you, consider giving it a star.
What you'll notice
Your compressor runtime is finally accurate
sensor.daikin_cycle_ml_runtime_compressor_today was underreporting. It only counted completed cycles that started today — missing overnight cycle tails and the currently-running cycle.
On our reference system, the sensor showed 3.4 h when ESPAltherma reported 10.3 h.
Now: the sensor matches the firmware counter within 0.6 %. If you have a fixed-scale card for this sensor, bump the maximum to 12 h or higher.
sensor.daikin_cycle_ml_duty_cycle_today (derived from the above) also corrects: from 33 % → 99.8 % on a continuous-compressor day, with its band attribute correctly flipping to saturated.
No more "lower your setpoint" advice during cold snaps
During a cold snap, if the backup heater (BUH) is running, the system used to still advise "lower the LWT" — advice that would push BUH usage higher and reduce efficiency. A 1-hour cached analysis wasn't being invalidated when BUH kicked in.
Now: heating_curve_advice returns state=keep with reason=buh_active while BUH is running, and flips back the moment BUH stops. A new suppressed_by attribute shows exactly why.
Smoother Home Assistant
~5 % of coordinator ticks were blocking the HA Core event loop for 7–25 s, briefly starving other integrations. Root cause: a COP-analysis query running every 30 s → 5 760 DB queries/day.
Now: that query is throttled to once per minute — 50 % fewer queries, fewer slow ticks.
Sample rate is now honest
Diagnostics showed samples_last_24h: 198 vs samples_expected_24h: 2880 (looked like 6.9 %). But the system had only been up for 103 minutes — the real rate was 95.7 %.
Now: diagnostics show samples_window: since_start with sample_rate_pct: 95.7 when uptime is under a day, and samples_window: 24h once it exceeds a day.
Under the hood
Fixes you won't see but should know about:
- Native-first counters. Whenever ESPAltherma reports a runtime counter (compressor, BUH, defrost, starts), that value now wins over our computed fallback. Every counter exposes
source: native/source: computedso you always know where the number came from. _read_floathardened. Firmware values oftrue,NaN, orinfare rejected cleanly instead of silently poisoning calculations.- BUH attribute leak.
buh_step1_s/buh_step2_s/buh_total_sno longer appear onruntime_compressor_today(they belong onruntime_buh_today).
Do I need to do anything?
No. Auto-updates via HACS. After upgrade:
runtime_compressor_todaycorrects within ~30 s.- Fixed-scale cards for that sensor → bump
maxto 12 h or higher. - Historical
daily_summaryrecords are unaffected — only today's live values change.
Known open issue
The tick p95 residual (25 s max) isn't fully eliminated — the throttle removes ~50 % of the load, but some slow ticks remain. Tracking on #353. If you're on slow bind-mount storage and notice lag, please attach iostat -x 5 output to that issue.
🔧 Technical Notes
Related PRs
| PR | Title |
|---|---|
| #361 | A3a sample-rate label + A3b cop_today throttle |
| #362 | A3 tick metrics decision record |
| #363 | A4 BUH excessive troubleshooting |
| #364 | Release v1.22.8 |
| #365 | CHANGELOG sync |
Issue: #353 — A1/A2/A3/A4 tracker
Design record: docs/design/a3-tick-metrics.md
Files Changed
| Area | File | Change |
|---|---|---|
| Engine | engine/cop_analyzer.py |
A2 BUH suppress |
| Engine | engine/runtime_source.py |
native-first resolvers |
| Coordinator | coordinator.py |
A3a _record_tick_health, A3b _refresh_cop_today |
| Sensor | sensor.py |
_resolve_attrs, source attr |
| Storage | db.py, store.py |
cycles_intersecting |
| Diagnostics | diagnostics.py |
samples_window, sample_rate_pct |
| Tests | tests/test_v1228_*.py |
new (A1/A2/A3) |
| Docs | docs/design/a3-tick-metrics.md, README.md |
new |
CI & Quality
- 6 093 tests, 100 % coverage
- Ruff: 0 errors · Mypy: clean
- CI matrix: 9/9 green (ruff, mypy, coverage, build, HACS, Hassfest, CodeQL, guard)
Residual (A3c)
25 s max-tick origin not fully eliminated. Needs prod-1 iostat -x 5 + grep daikin_cycle_ml /home-assistant.log. Tracked on #353.
