Skip to content

fix(climate): align central unit mode commands and fan mode with OWNd canonical protocol (OWNd#77) - #630

Merged
GreenGrassBlueOcean merged 4 commits into
v2-phase1-architecturefrom
fix/issue-77-climate-protocol-alignment
Oct 6, 2026
Merged

GreenGrassBlueOcean merged 4 commits into
v2-phase1-architecturefrom
fix/issue-77-climate-protocol-alignment

Conversation

@GreenGrassBlueOcean

@GreenGrassBlueOcean GreenGrassBlueOcean commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Release blocker

Do not merge until OWNd 2.0.0b10 is on PyPI. This PR follows the climate protocol fixes in OpenWebNet-HA/OWNd#82 (OWNd#77). Until then the jobs that install OWNd 2.0.0b9 or OWNd master (OWNd (pinned / latest / dev), HA Compatibility, test-coverage, Run Pytest Suite & Coverage) fail, because neither has the OWNd#82 frames.

Once 2.0.0b10 is published, push the prepared bump (manifest.json OWNd==2.0.0b10, pyproject.toml OWNd>=2.0.0b10, plus docs/architecture/anti-drift-safeguards.md from scripts/sync_documentation.py --update; local branch prep/ownd-2.0.0b10-bump, commit d8d5a775). CI should then go green.

Cross-repo conformance: OWNd run 37518042220 checked out OWNd 885b8e4 (the OWNd#82 head) and this PR at de8cf4b3. Both jobs passed: MyHOME suite 3476 passed, golden corpus 570 passed. The earlier run 37513598943 covered 8ed3c012.


Summary

Aligns the integration with the thermoregulation frames OWNd#82 builds. The code change is small; most of the diff updates tests that asserted the old frames.

Code (custom_components/myhome/climate.py)

  1. No fan mode on central units. #0 and #0#N have no fan coil, and OWNd#82 refuses set_fan_speed for them (the firmware drops *#4*#0*#11*S##). __init__ and _enable_fan_mode() no longer give a central unit ClimateEntityFeature.FAN_MODE or fan_modes, so a restored state can't add it back either. Turning OWNd's ValueError into a ServiceValidationError (fan_speed_zone_only) for any other caller is already on v2-phase1-architecture (fix(climate): turn OWNd's fan-speed ValueError into a service error (OWNd#77) #641).
  2. AUTO on standalone zones. Since OWNd 3014896, set_mode(CLIMATE_MODE_AUTO) always builds *4*311*#Z##. MyHOME flags every zone that is not a central unit standalone by default, so AUTO now reaches the bus for those zones instead of being dropped. The warning branch for a dropped AUTO is gone. The None check before sending stays (de8cf4b3): set_mode is still typed OWNHeatingCommand | None, and without the check mypy --strict reports an arg-type error once OWNd is importable.

Tests

  1. Central-unit modes: test_climate_central_discovery.py and test_phase2_architecture.py now expect 303 (off), 1 (heat), 0 (cool) and 311 (auto). Sources: the MyHomeServer1 firmware forwards these and drops the old 100/101/110 (own-firmware-oracle#10), and BTicino's client (libqtdevices TS10_1_0_23) sends 303/1/0 to the 99-zone central. Not verified: how a physical 3550 or 4695 central unit reacts to them.
  2. Fan speed: test_component_climate.py expects the plain zone, *#4*5*#11*S## instead of *#4*#5*#11*S##, and covers the central-unit fan guard.
  3. Golden corpus: the central-mode fixtures (*4*1*#0##, *4*0*#0##, *4*303*#0##, *4*1*#0#1##) now cite source: encyclopedia and the libqtdevices tests, as in OWNd's copy.
  4. Dry contact: test_gateway_messages.py uses WHAT 32 for the dry-contact OFF event. With 2.0.0b9, *25*0#1*31## only passed through a parser fallback that OWNd#82 fix 9 removes. WHAT 32 is the WHO 25 value, also seen in the MyHOME#418 traces.

Verification

  • Local, against OWNd 885b8e4: 3476 passed. ruff check and mypy on climate.py are clean.
  • Conformance run 37518042220, as above.

🤖 Generated with Claude Code

… canonical protocol (OWNd#77)

- Guard async_set_fan_mode against central units and catch ValueError from OWNd set_fan_speed
- Update central unit mode test assertions to match canonical WHAT codes (303 off, 1 heat, 0 cool, 311 auto)
- Update standalone zone AUTO mode test to assert gateway.send.assert_not_called()
- Update fan speed tests to expect plain zone wire frames (*#4*5*#11*1##)
- Update dry contact test to use canonical WHAT 32 for off event
- Synchronize golden thermo fixtures, corpus.json, and protocol conformance matrix
@GreenGrassBlueOcean
GreenGrassBlueOcean force-pushed the fix/issue-77-climate-protocol-alignment branch from b23cb67 to 8ed3c01 Compare October 6, 2026 18:43
OWNHeatingCommand.set_mode is typed OWNHeatingCommand | None: it still
returns None for a mode it does not build. Since OWNd#82 (3014896) AUTO is
always built as *4*311*#Z##, so the check never fires for AUTO, but sending
the result unchecked is an arg-type error under mypy --strict once OWNd is
importable (CI's ratchet runs without OWNd, which is why it passed).
Same pattern as the OFF branch above it.

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 69f81dc into v2-phase1-architecture Oct 6, 2026
17 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the fix/issue-77-climate-protocol-alignment branch October 6, 2026 20:56
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