Repository navigation
feat(climate): support WHO 4 holiday plan and vacation program attributes - #689
Conversation
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Protocol Trace Gate VerifiedPhysical on-wire traces validating WHO 4 holiday plan ( Marked ready for review. |
GreenGrassBlueOcean
left a comment
There was a problem hiding this comment.
Audit of #689: WHO 4 holiday plan and vacation program attributes
Summary
Exposes program, holiday_days and scenario as climate extra-state attributes, restores them on reboot, clears them when a normal mode or OFF frame arrives, and rejects negative setpoints on mode-target frames (the old 1102 -> -10.2 C bug). Dual-compatible with the pinned OWNd==2.0.0b11 (via getattr) and OWNd#97.
Evidence
- Authentic F453AV (FW 3.0.14) Central Unit
#0traces from @nce2704 (#692) back the holiday plan (*4*115#1101*#0##), auto-expiry (*4*1101*#0##), antifreeze/OFF and Winter->Summer transitions. Companion F454 / MyHomeServer1 / F455 traces are listed in the description. tests/test_climate_holiday_program.py: daily holiday, multi-day vacation (heat/cool/auto), clearing on manual/OFF, state restoration (including invalid values), negative-setpoint rejection, season transition + antifreeze.- 16/16 CI checks green on the previous head, Codecov clean.
Strengths
- Defensive dual-OWNd compatibility; the tests use a parse-or-mock helper so they pass on both.
- Permanent negative-setpoint safety net.
- Restoration and clearing logic present and tested.
Nits
- Addressed in b7077e5: the zone-state OFF path only cleared
_holiday_days; it now also clears_programand_scenario, with a new test (test_zone_state_off_clears_all_holiday_attributes). - Behaviour note, not changed: a mode-target frame with
set_temperature=Nonenow keeps the previous nominal instead of clearing it. This is intended for holiday frames, but it differs from before. - Real-parser coverage of the new attributes is limited until OWNd#97 lands; the mock fallback is intentional.
Verdict
Ready to merge. Small, well-scoped, trace-backed. No functional regressions found in the climate event path. CI should be re-confirmed on b7077e5 before merging.
(Local verification on b7077e5: 162 climate tests pass, ruff check clean.)
28d92b4
into
OpenWebNet-HA:v2-phase1-architecture
What is the issue?
In OpenWebNet-HA/OWNd#97, WHO 4 holiday plan frames (
*4*115#110P*#0##,*4*215#210P*#0##) and multi-day vacation frames (*4*13DDD#PPPP*#0##,*4*23DDD#PPPP*#0##,*4*33DDD#PPPP*#0##) are properly decoded:PPPPis extracted modulo 100 asevent.programrather than being misparsed as a negative Celsius setpoint (-10.2 °C).DDDis extracted asevent.holiday_days.Previously, MyHOME did not capture
programorholiday_daysinextra_state_attributesor restore them on reboot, nor did it guard against legacy negative setpoint corruption.How it is solved
custom_components/myhome/climate.py:_program,_holiday_days, and_scenariointernal tracking.extra_state_attributes:attrs["program"] = self._programattrs["holiday_days"] = self._holiday_daysattrs["scenario"] = self._scenarioself._holiday_daysandself._programwhen standard manual, setpoint, or off frames arrive.async_restore_last_state()restoresprogram,holiday_days, andscenariofrom entity attributes across restarts.set_temperature(< 0 °C) inMESSAGE_TYPE_MODE_TARGETto permanently prevent phantom negative temperature corruption.manifest.jsonremainsOWNd==2.0.0b11.OWNd==2.0.0b11and upcomingOWNdin PR Two lights with the same APL code? #97.tests/test_climate_holiday_program.py):Where Are the Traces? Physical Ground Truth & Repository Corpus
In accordance with the repository's strict protocol verification gate ("They are facts: never edit a frame"), all holiday decoding, vacation duration attributes, and seasonal transitions in this PR are verified against authentic customer on-wire bus captures stored in
tests/fixtures/traces/:1. Authentic Holiday & Central Unit Traces (
tests/fixtures/traces/issue_619/)Contributed by @nce2704 from an operational multi-zone BTicino plant with Central Unit
#0via a physical BTicino F453AV gateway (FW 3.0.14) (ingested and verified in #692):myhome_trace_F453AV_who4_2026-10-11T11-02-55.Holiday.ON.json*4*115#1101*#0##*4*21*#0##*4*22*#0##*4*111*#Z###0Daily Holiday plan. Proves1101encodes weekly program 1 (attrs["program"] = 1), permanently disproving legacy-10.1 °Csetpoint misparsing. Verified intest_holiday_plan_heating_program.myhome_trace_F453AV_who4_2026-10-11T11-10-23.Holiday.OFF.automatically.json*4*1101*#0##*4*21*#0##*4*22*#0###0to weekly program 1 and clearing temporary holiday attributes. Verified intest_holiday_cleared_on_normal_mode_or_off.myhome_trace_F453AV_who4_2026-10-11T11-13-06.Antifreeze.ON.json*4*102*#0##*4*102*#Z##*4*102*Z###0to subordinate zones and physical actuators without altering nominal setpoints. Verified intest_season_transition_and_antifreeze_scenario.myhome_trace_F453AV_who4_2026-10-11T11-15-50.one.zone.to.cool.json*4*202*#0##*4*202*Z##*4*14*...###0switches plant season from Winter to Summer into Thermal Protection (*4*202*#0##). Verified intest_season_transition_and_antifreeze_scenario.myhome_trace_F453AV_who4_2026-10-11T10-49-26.Central.to.OFF.json*4*103*#0##*4*303*Z###0manual turn OFF propagating to physical zone actuators. Verified intest_holiday_cleared_on_normal_mode_or_off.myhome_trace_F453AV_who4_2026-10-11T10-29-57.json*4*1*Z##*4*111*#Z##*4*1*Z##) and weekly program schedule frames (*4*111*#Z##), proving season telemetry does not disrupt active entity schedule mode.2. Companion Multi-Gateway WHO 4 Traces in Repository Corpus
In addition to the F453AV holiday dataset, the climate test suite runs against physical on-wire bus captures across four additional gateway families:
tests/fixtures/traces/issue_629/): Verifies central unit status frames (*4*21*#0##,*4*22*#0##) and multi-zone status updates from physical installations.tests/fixtures/traces/issue_649/&tests/fixtures/traces/issue_429/): Verifies live season state telemetry (*4*1*Z##/*4*0*Z##) and setpoint update sequences.tests/fixtures/traces/issue_674/): Verifies timeouts, recovery, and probe discovery on legacy modular gateways.tests/fixtures/traces/issue_619/myhome_sweep_F453AV_all_2026-10-04T19-45-11.json): Verifies full bus sweep of WHO 4 alongside WHO 1, 2, 5, 13, 16, 18, and 1001.Verification
test_climate_holiday_program.py.verify_ha_standards.py).sync_documentation.py --check).