Skip to content

fix(climate): turn OWNd's fan-speed ValueError into a service error (OWNd#77) - #641

Merged
GreenGrassBlueOcean merged 1 commit into
v2-phase1-architecturefrom
fix/ownd77-climate-guards
Oct 6, 2026
Merged

GreenGrassBlueOcean merged 1 commit into
v2-phase1-architecturefrom
fix/ownd77-climate-guards

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

Summary

Prepares MyHOME for OpenWebNet-HA/OWNd#82 (the OWNd#77 firmware findings). With that PR, OWNHeatingCommand.set_fan_speed raises ValueError for 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_mode did not catch it, so the service call failed with an unhandled error.

async_set_fan_mode now turns it into a ServiceValidationError (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 to standalone=True here, 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

  • New test: 2 passed with OWNd 2.0.0b9 (the pinned release) and with the OWNd#82 head.
  • Full suite with OWNd 2.0.0b9: 3414 passed, 9 skipped, 3 failed. The 3 failures (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 on v2-phase1-architecture @ 0f7b0de with b9, so this PR does not cause them.
  • Full suite with an OWNd#82 checkout: only the 11 old-frame tests listed above fail.
  • ruff check, scripts/verify_ha_standards.py and scripts/sync_documentation.py --check are clean.

🤖 Generated with Claude Code

…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-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 a0890e3 into v2-phase1-architecture Oct 6, 2026
17 checks passed
@GreenGrassBlueOcean
GreenGrassBlueOcean deleted the fix/ownd77-climate-guards branch October 6, 2026 18:21
xtimmy86x pushed a commit to xtimmy86x/MyHOME that referenced this pull request Oct 8, 2026
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