Revert narrowing group writes to lit members (fixes 2.2.1 regression) - #5
Merged
Conversation
2.2.1 stopped addressing a group directly and wrote only to the members whose state read STATE_ON, so that adapting a partly-lit group wouldn't switch on the ones left off. That relies on per-member state being accurate, and it isn't: a Zigbee bulb lit by an earlier groupcast often never reports back, so Home Assistant still believes it is off — which is what ZHA's group_members_assume_state option exists to work around. Anything unavailable or unknown was dropped from the write as well. The result was worse than the problem: adapting a group changed only the one member Home Assistant happened to think was on, leaving the rest at whatever they were. Groups are addressed as a whole again. The panel still recognises a group and still recommends adding the individual lights instead, which remains the only reliable way to avoid the original behaviour — Sundial cannot tell which members are really lit, so it cannot decide which to skip. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XdpAyEvqgNcBstA75dQ5wr
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.
Reverts the
_write_targetschange from #4. Bumps the manifest to2.2.2.The regression
2.2.1 stopped addressing a group directly and instead wrote only to the members whose state read
STATE_ON, so that adapting a partly-lit group wouldn't switch on the ones left off.That relies on per-member state being accurate, and it isn't. A Zigbee bulb lit by an earlier groupcast often never reports back, so Home Assistant still believes it's off — which is exactly what ZHA's
group_members_assume_stateoption exists to work around. Members readingunavailableorunknownwere dropped from the write too.So adapting a group changed only the one member Home Assistant happened to think was on, and left the rest alone. Worse than the behaviour it was trying to fix.
What changes
Groups are addressed as a whole again, as they were in 2.2.0 and earlier.
group_members()stays, but only to report an entity as a group in the panel — it no longer influences what gets written. The recommendation to add the individual lights instead stays too, and is now the whole of the answer: Sundial can't tell which members are really lit, so it can't decide which to skip.The compact Status section and the reworded outcomes from #4 are untouched.
Verification
ruff check .clean,python -m pytest33 passed,npm run buildclean with the bundle unchanged (this is Python-only).🤖 Generated with Claude Code
https://claude.ai/code/session_01XdpAyEvqgNcBstA75dQ5wr
Generated by Claude Code