Repository navigation
fix(climate): turn OWNd's fan-speed ValueError into a service error (OWNd#77) - #641
Merged
GreenGrassBlueOcean merged 1 commit intoOct 6, 2026
Merged
Conversation
…OWNd#77) OWNd#82 makes OWNHeatingCommand.set_fan_speed raise ValueError for a central unit or the general zone: the firmware forwards *#4*Z*#11*S## only for a plain zone 1..99 (gdluck's audit A2). async_set_fan_mode did not catch it. It now raises ServiceValidationError (fan_speed_zone_only, en/fr/it/nl), sends nothing and keeps the fan mode. The test patches the builder, so it passes with OWNd 2.0.0b9 and with the OWNd#82 head. 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! |
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.
Summary
Prepares MyHOME for OpenWebNet-HA/OWNd#82 (the OWNd#77 firmware findings). With that PR,
OWNHeatingCommand.set_fan_speedraisesValueErrorfor a central unit (#0,#0#N) or the general zone. The firmware forwards*#4*Z*#11*S##only for a plain zone 1–99 (gdluck's audit A2;*#4*#0*#11*1##produces no bus frame).async_set_fan_modedid not catch it, so the service call failed with an unhandled error.async_set_fan_modenow turns it into aServiceValidationError(fan_speed_zone_only, translated in en/fr/it/nl). It sends nothing and leaves the fan mode as it was. A central entity can expose a fan mode when a restored state had one (async_restore_last_state).The test patches the OWNd builder, so it passes with the pinned OWNd 2.0.0b9 and with the OWNd#82 head.
The other downstream item from the review, AUTO on zones flagged standalone, is handled in OWNd#82:
set_mode(AUTO)now always builds*4*311*#Z##, so MyHOME needs no change for it. (Every zone that is not a central unit defaults tostandalone=Truehere, so hiding AUTO for standalone zones would have removed it from zones that do run under a central unit.)Not in this PR
The OWNd bump itself. With the OWNd#82 head, these tests still assert the old frames and must be updated when OWNd is bumped:
test_climate_central_discovery.py,test_component_climate.py(2),test_gateway_messages.py::TestDryContactEvents::test_dry_contact_off,test_golden_conformance.py(four central-mode builder-parity cases),test_heating.py::test_set_fan_speed_variations,test_phase2_architecture.py(2).Verification
test_component_alarm.py::test_alarm_setup_restores_and_discovers,test_issue_619_dimmer_trace.py::test_f453av_sweep_trace_replay,test_issue_629_f454_central_unit_trace.py::test_f454_sweep_trace_replay) also fail onv2-phase1-architecture@ 0f7b0de with b9, so this PR does not cause them.ruff check,scripts/verify_ha_standards.pyandscripts/sync_documentation.py --checkare clean.🤖 Generated with Claude Code