Skip to content

Deactivate active light color loops before color commands - #832

Draft
dmulcahey wants to merge 1 commit into
devfrom
codex-updated-pr-733
Draft

Deactivate active light color loops before color commands#832
dmulcahey wants to merge 1 commit into
devfrom
codex-updated-pr-733

Conversation

@dmulcahey

@dmulcahey dmulcahey commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

When an illuminated light is running a color loop, sending a color or color-temperature command before disabling the loop can leave the requested color unapplied. Stop the known active loop first. If deactivation fails, retain the effect state and skip dependent color commands while still allowing independent on/brightness/flash work.

Retain the existing late-deactivation path for a light that is off with a remembered loop; that case is not claimed as newly fixed. Effect state changes only after successful activation/deactivation responses. Tests cover command ordering, inactive/off guards, failure responses, and independent commands.

Addresses home-assistant/core#153431 and zigpy/backlog#48. Updated replacement for #733; no broader light/effect redesign.

Validation against dev at 66603431339afe37fa0048b70ff31d77dceb8f95: Python 3.12 full suite, 1391 passed, coverage above the 95% project gate; full pre-commit (codespell, Ruff, formatting, mypy, lock check) passed. Relevant regression checks fail on the unchanged base. GitHub CI for Python 3.12/3.13/3.14 is reported separately on the PR.

@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.25%. Comparing base (6660343) to head (3ce5ad8).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #832      +/-   ##
==========================================
+ Coverage   97.19%   97.25%   +0.06%     
==========================================
  Files          57       57              
  Lines       10560    10575      +15     
==========================================
+ Hits        10264    10285      +21     
+ Misses        296      290       -6     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dmulcahey
dmulcahey force-pushed the codex-updated-pr-733 branch from bc5acaf to 3ce5ad8 Compare September 5, 2026 19:07
@dmulcahey dmulcahey changed the title Codex updated: Fix light effect not being turned off sometimes Deactivate active light color loops before color commands Sep 5, 2026
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.

1 participant