Skip to content

feat(climate): follow WHO 4 dimension 7 zone state on Home+Control plants (#429) - #457

Merged
GreenGrassBlueOcean merged 2 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/climate-zone-state
Sep 24, 2026
Merged

GreenGrassBlueOcean merged 2 commits into
OpenWebNet-HA:v2-phase1-architecturefrom
GreenGrassBlueOcean:feat/climate-zone-state

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

Part of #429. Needs OpenWebNet-HA/OWNd#60 (fixes OWNd#58) to take effect; until the OWNd pin includes it, nothing changes.

Problem

On MyHomeServer1 + Home+Control plants, the zone's mode and setpoint only travel as WHO 4 dimension 7 (*#4*Z*7*CONTEXT*STATE[*TTTT]##). The reply to *#4*Z## never carries it (seen on both #429 plants). OWNd 2.0.0b8 parses dimension 7 with no message type, so the climate entity never saw it. The nominal setpoint also went stale, because the dim-12 *T*3 reply only updates the shown target (#454).

Change: climate.py

Handles MESSAGE_TYPE_ZONE_STATE (OWNd#60):

Dimension 7 state Mode Setpoint
setpoint heating → HEAT, cooling → COOL, automatic → AUTO (if the zone supports it); generic keeps the mode becomes the nominal target; shown target = setpoint + local offset
comfort / eco same as setpoint unchanged
protection / off OFF nominal setpoint kept for HEAT/COOL to restore, as WHAT 102/202 already do (#383)
unknown unchanged unchanged

The message type and value names are spelled out locally until the OWNd pin exports them.

Traces and golden samples from #429

The reporters' traces are stored verbatim in tests/fixtures/traces/issue_429, with a README recording who recorded what and what they did at each time. The privacy checker finds no personal data in them.

  • @TheDarkWizard (MyHomeServer1 2.87.13, 4 KM4691 zones, zone 4 heating-only), 8 card exports:
    • OFF → manual → OFF
    • setpoint steps 29 / 23 / 33 °C
    • summer scenario, winter command, heat ↔ cool switches
    • Away (22.5 → 26.5 → 21 °C)
    • a restart
    • a manual override and a schedule step to Summer ECO
  • @xtimmy86x (F454 on a MyHomeServer1 plant, 7 zones):
    • the 13 h Night → Comfort → Eco program trace
    • the follow-up showing that a setpoint written from Home Assistant takes the zone out of MyHomeServer1's program: the next #7 writes go to zones 2–7 only, and zone 1 keeps 20 °C

tests/test_issue_429_zone_state.py replays each trace through one climate entity per zone and checks the mode and nominal setpoint at the reporters' times. Findings pinned by the tests:

  • a 35.0 °C protection value arrives just before the real setpoint when a zone leaves OFF;
  • Away and schedule steps are plain setpoints, with no preset on the bus;
  • status replies after a restart carry no dimension 7.

The 9 dimension-7 replays are a strict xfail while the installed OWNd drops dimension 7, following the same detect-don't-pin pattern as the other OWNd markers.

The golden corpus gets the same 9 verbatim community-plant-capture fixtures as OWNd#60, with provenance in SOURCE.yaml. corpus.json is regenerated (179 fixtures; the README count was stale at 58).

Unit tests in test_component_climate.py cover the cases the traces don't reach: comfort/eco without a temperature, generic context, a context the zone doesn't support, a setpoint while OFF, unknown values, and the local offset.

Tests

  • Pinned OWNd 2.0.0b8: 2044 passed, 15 xfailed (9 new plus 6 that already existed).
  • Against OWNd#60: 2059 passed.
  • ruff and mypy --strict on climate.py are clean.

Checklist

  • V2 Architecture: New entities implement handle_event() and do not manually subscribe via async_dispatcher_connect. (No new entities; the existing climate handle_event gains a branch.)

After OWNd#60 is released

Bump the OWNd pin. The 9 strict xfails in test_issue_429_zone_state.py then pass and fail the build, so drop needs_dimension_7 in the same change.

🤖 Generated with Claude Code

GreenGrassBlueOcean and others added 2 commits September 24, 2026 18:32
…ants (OpenWebNet-HA#429)

On MyHomeServer1 + Home+Control plants the zone's mode and setpoint only
travel as dimension 7 (*OpenWebNet-HA#4*Z*7*CONTEXT*STATE[*TTTT]##); the reply to
*OpenWebNet-HA#4*Z## never carries it. OWNd decodes it as MESSAGE_TYPE_ZONE_STATE from
OWNd#60 on.

- setpoint / comfort / eco: HEAT, COOL or AUTO from the context when the
  zone supports it; a setpoint also becomes the nominal target (+ local
  offset for the shown target). The dimension 12 "*T*3" reply left that
  nominal target stale on these plants (OpenWebNet-HA#454).
- protection / off: OFF, keeping the nominal setpoint for HEAT/COOL to
  restore, as WHAT 102/202 already do (OpenWebNet-HA#383).
- Unknown values change nothing.

The message type and value names are spelled out locally until the OWNd
pin exports them; the pinned 2.0.0b8 never produces the type, so nothing
changes there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…den samples

The traces @TheDarkWizard and @xtimmy86x contributed on OpenWebNet-HA#429, verbatim in
tests/fixtures/traces/issue_429 with a README of who recorded what and
what they did at each time:

- MyHomeServer1 2.87.13 + Home+Control, 4 zones: OFF/manual/OFF,
  setpoint steps, summer scenario, winter command, heat/cool switches,
  Away, a restart (no dimension 7 in the status replies), a manual
  override and a schedule step.
- F454 on a MyHomeServer1 plant, 7 zones: the 13 h Night -> Comfort ->
  Eco program, and the follow-up showing that a setpoint written from
  Home Assistant takes the zone out of MyHomeServer1's program.

test_issue_429_zone_state replays them through one climate entity per
zone and checks mode and nominal setpoint at the reporters' times. The
dimension 7 tests are a strict xfail while the installed OWNd drops
dimension 7 (OWNd#58); all pass against OWNd#60. The privacy check finds
no personal data in the traces.

The golden corpus gets the same 9 capture fixtures as OWNd#60, with
provenance in SOURCE.yaml; corpus.json is regenerated (179 fixtures; the
README count was stale at 58).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@GreenGrassBlueOcean
GreenGrassBlueOcean merged commit ce86302 into OpenWebNet-HA:v2-phase1-architecture Sep 24, 2026
16 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the feat/climate-zone-state branch September 24, 2026 17:01
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