Skip to content

Revert narrowing group writes to lit members (fixes 2.2.1 regression) - #5

Merged
ameesme merged 1 commit into
mainfrom
claude/revert-group-narrowing
Aug 3, 2026
Merged

Revert narrowing group writes to lit members (fixes 2.2.1 regression)#5
ameesme merged 1 commit into
mainfrom
claude/revert-group-narrowing

Conversation

@ameesme

@ameesme ameesme commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Reverts the _write_targets change from #4. Bumps the manifest to 2.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_state option exists to work around. Members reading unavailable or unknown were 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 pytest 33 passed, npm run build clean with the bundle unchanged (this is Python-only).

🤖 Generated with Claude Code

https://claude.ai/code/session_01XdpAyEvqgNcBstA75dQ5wr


Generated by Claude Code

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
@ameesme
ameesme merged commit d5d7cd9 into main Aug 3, 2026
4 checks passed
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