fix(light): an unknown WHAT does not keep a state restored at startup - #458
Merged
GreenGrassBlueOcean merged 1 commit intoSep 24, 2026
Conversation
Live on the MH200 with the OpenWebNet-HA#456 test build: light.light_74 came back "on" from the state the WHAT 19 bug had left, and since the bus only ever answers *1*19*74## (+ a WHO 1001 fault mask), "keep the last state" kept that stale "on" forever. A state seen on the bus or set from Home Assistant is still kept against an unknown WHAT; one that was only restored at startup now becomes unknown on the first fault report, and the warning says so. 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
merged commit Sep 24, 2026
57cfd41
into
OpenWebNet-HA:v2-phase1-architecture
16 checks passed
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.
Follow-up to #456, found live on the MH200 with a test build (MyHOME
v2-phase1-architecture+ OWNd#59/#60).Problem
light.light_74still showed on. Since the restart, the bus only sent:At startup Home Assistant restored "on", which was the state the WHAT 19 bug had left behind. #456 keeps the last state when an unknown WHAT arrives, so that stale "on" was kept forever.
Change
its state is unknowninstead ofkeeping its last state._is_on_restoredis set whereasync_restore_last_staterestores on/off. It is cleared wherever a real state is set: bus events,_apply_brightness_state, timed on, and the color-temperature turn-on.Tests
tests/test_component_light.py:*1*19*74##after a restored "on"): a strict xfail while the installed OWNd reports WHAT 19 as onResults: 2047 passed and 17 xfailed on the pinned OWNd; 2064 passed against OWNd#59 + #60. ruff and
mypy --strictonlight.pyare clean.🤖 Generated with Claude Code