Repository navigation
fix: discovery wedge, command limits, and dim timing - #180
Merged
cursor[bot] merged 5 commits intoNov 21, 2026
Merged
cursor[bot] merged 5 commits into
cursor[bot] merged 5 commits into
Conversation
A 343 followed by a 344 and no data cleared the tree session and the stall timer, then returned without scheduling a retry. The network stayed on discovering until restart. An empty body for a known network now fails the request the same way a malformed tree does. A tree that cannot be attributed to a network is still dropped.
Any client that can publish can ask C-Gate for a whole network as fast as the broker will take it. gettree, getall, and bridge/announce now share the existing sliding-window limiter, with a separate counter per command, and drop further commands once a kind exceeds 30 in a minute. The cap is a standalone setting so it can be raised without an add-on option that invites turning the limit off.
INCREASE and DECREASE armed their five-second wait as soon as the GET was queued. While the command pool was down that wait expired, Home Assistant was told the old level, and the ramp never went out. The wait now starts when the queue dequeues the read, and a read dropped from a full queue fails the dim immediately so the listener does not stay registered.
Each tree //PROJECT pass stored its handler on one field and cleared that field when it finished. A second pass replaced the handler, then the first pass's timeout or error nulled the new handler and could apply the first pass's networks. A generation counter lets only the current pass clear the handler and publish what it found.
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.
Summary
Four fixes, released as 1.40.5.
Changes
Test plan
npm testpasses locally with no failures (3414 tests)npm run lintandnpm run typecheckpassChecklist
package.jsonandhomeassistant-addon/config.yaml(if releasing)CHANGELOG.mdupdated (if releasing)