-
Notifications
You must be signed in to change notification settings - Fork 63
Fix stuck light transitioning flag after task cancellation #672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TheJulianJES
merged 5 commits into
zigpy:dev
from
TheJulianJES:tjj/light_restart_mode_automation_cancelled_error
Feb 25, 2026
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
648c4fb
WIP: Clean up light transitioning flag on task cancellation
TheJulianJES c7a14b2
Add `_async_cleanup_transition_if_stuck` method
TheJulianJES eddd444
Add tests
TheJulianJES 59611bf
Add missing guard for "move_to_level_if_color" step
TheJulianJES 34e38c4
Reduce diff by introducing new method for implementation
TheJulianJES File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking of having zigpy soon handle all ZCL default responses directly, throwing an error for any non-
SUCCESScodes. Is it possible for a light to return a non-successful result?Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's the same question I asked in the comment above. I hoped you would have an answer 😄
I don't think we ever hit these paths..? Before I first touched the light class like 6(?) years ago, this code already existed. Maybe we can just remove soon?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the existing comments were collapsed in the
/changesview...Yeah, let's remove them and see what breaks.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are quite a few of these: https://github.com/search?q=repo%3Azigpy%2Fzha%20%22!%3D%20Status.SUCCESS%22%20OR%20repo%3Azigpy%2Fzha%20%22is%20not%20Status.SUCCESS%22&type=code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't tell you how much I hate that new feature 😅
I'll put up another PR to remove them. We don't have to merge that for this release yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yeah... The
isinstance(result, Exception)check can most definitely go as well. Returning an exception instead of raising seems interesting 😄There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely. We got rid of most of them but the root cause seems to be
asyncio.gather(..., return_exceptions=True): https://github.com/search?q=repo%3Azigpy%2Fzha%20return_exceptions%3DTrue&type=codeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok. That's at least always in places where it kind of makes sense.