Repository navigation
fix(climate): align central unit mode commands and fan mode with OWNd canonical protocol (OWNd#77) - #630
Merged
GreenGrassBlueOcean merged 4 commits intoOct 6, 2026
Conversation
… 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
force-pushed
the
fix/issue-77-climate-protocol-alignment
branch
from
October 6, 2026 18:43
b23cb67 to
8ed3c01
Compare
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 Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
GreenGrassBlueOcean
deleted the
fix/issue-77-climate-protocol-alignment
branch
October 6, 2026 20:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.jsonOWNd==2.0.0b10,pyproject.tomlOWNd>=2.0.0b10, plusdocs/architecture/anti-drift-safeguards.mdfromscripts/sync_documentation.py --update; local branchprep/ownd-2.0.0b10-bump, commitd8d5a775). CI should then go green.Cross-repo conformance: OWNd run 37518042220 checked out OWNd
885b8e4(the OWNd#82 head) and this PR atde8cf4b3. Both jobs passed: MyHOME suite 3476 passed, golden corpus 570 passed. The earlier run 37513598943 covered8ed3c012.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)#0and#0#Nhave no fan coil, and OWNd#82 refusesset_fan_speedfor them (the firmware drops*#4*#0*#11*S##).__init__and_enable_fan_mode()no longer give a central unitClimateEntityFeature.FAN_MODEorfan_modes, so a restored state can't add it back either. Turning OWNd'sValueErrorinto aServiceValidationError(fan_speed_zone_only) for any other caller is already onv2-phase1-architecture(fix(climate): turn OWNd's fan-speed ValueError into a service error (OWNd#77) #641).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. TheNonecheck before sending stays (de8cf4b3):set_modeis still typedOWNHeatingCommand | None, and without the checkmypy --strictreports an arg-type error once OWNd is importable.Tests
test_climate_central_discovery.pyandtest_phase2_architecture.pynow 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 (libqtdevicesTS10_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.test_component_climate.pyexpects the plain zone,*#4*5*#11*S##instead of*#4*#5*#11*S##, and covers the central-unit fan guard.*4*1*#0##,*4*0*#0##,*4*303*#0##,*4*1*#0#1##) now citesource: encyclopediaand the libqtdevices tests, as in OWNd's copy.test_gateway_messages.pyuses 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
885b8e4: 3476 passed.ruff checkandmypyonclimate.pyare clean.🤖 Generated with Claude Code