Skip to content

feat(climate): support WHO 4 season frames and generic setpoint mode (#649) - #657

Merged
GreenGrassBlueOcean merged 1 commit into
v2-phase1-architecturefrom
feat/climate-audit-consolidated-649
Oct 8, 2026
Merged

GreenGrassBlueOcean merged 1 commit into
v2-phase1-architecturefrom
feat/climate-audit-consolidated-649

Conversation

@GreenGrassBlueOcean

Copy link
Copy Markdown
Contributor

Consolidated WHO 4 Climate Season & Setpoint Mode Fixes

Supercedes and resolves CI failures and architectural bugs identified in #649 and #650.

Audit & Root Cause Analysis of #649

  1. CI Failure on fix(climate): keep AUTO zones on season frames, write generic setpoint mode #649:
    tests/test_climate_season_frame.py failed CI due to Ruff violation I001 [*] Import block is un-sorted or un-formatted (import OWNd.message as own_message placed after Home Assistant imports). This triggered failure in tests/test_ha_standards.py and scripts/verify_ha_standards.py.
  2. Incorrect Mode in async_set_hvac_mode:
    PR fix(climate): keep AUTO zones on season frames, write generic setpoint mode #649 changed async_set_hvac_mode to send mode=SETPOINT_WRITE_MODE (generic digit 3) when selecting HVACMode.HEAT or COOL. As confirmed by physical bus captures, digit 3 leaves the active season unchanged. Explicitly changing mode in Home Assistant to HEAT or COOL must send mode 1 (CLIMATE_MODE_HEAT) or mode 2 (CLIMATE_MODE_COOL). Generic digit 3 must only be written in async_set_temperature().
  3. Dual Compatibility with Released OWNd 2.0.0b10 and Dev OWNd:
    tests/test_heating.py and tests/test_message_edges.py are made dual-compatible with both released OWNd 2.0.0b10 (where *4*1*Z## reports as hvac_mode) and upcoming OWNd (where it reports as hvac_season).

Changes

  • custom_components/myhome/climate.py:
    • Handle MESSAGE_TYPE_SEASON frames: retain existing zone HVAC mode if running; adopt season if off/none; update central unit dispatcher.
    • Retain mode 1 (heat) and 2 (cool) in async_set_hvac_mode.
    • Simplify async_set_temperature to write SETPOINT_WRITE_MODE (generic 3).
    • Expose season extra state attribute.
  • tests/test_climate_season_frame.py: Clean, Ruff-compliant imports.
  • tests/test_component_climate.py: Verified setpoint writes assert digit 3 and mode changes assert digit 1/2.
  • tests/test_heating.py: Dual-compatible assertion for season and mode.
  • tests/test_message_edges.py: Dual-compatible assertion for holiday heating/cooling.

Co-authored-by: gdluck 9041273+gdluck@users.noreply.github.com

…649)

- Decode WHO 4 *4*1*Z## and *4*0*Z## season frames without altering running zone HVAC mode
- Write generic mode 3 in async_set_temperature to preserve active plant season
- Retain explicit mode 1 (heat) and 2 (cool) in async_set_hvac_mode
- Maintain dual backward compatibility with released OWNd 2.0.0b10 and dev OWNd
- Ensure 100% test coverage across both pinned OWNd 2.0.0b10 and newer OWNd releases

Co-authored-by: gdluck <9041273+gdluck@users.noreply.github.com>
@GreenGrassBlueOcean
GreenGrassBlueOcean force-pushed the feat/climate-audit-consolidated-649 branch from 5da5314 to 7d9b7c8 Compare October 8, 2026 07:37
@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!

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