Repository navigation
fix: tolerate transient poll failures before marking vehicle offline - #475
Merged
Merged
Conversation
This was referenced Oct 17, 2026
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.
The vehicle
availabletopic wentofflineon the first failed poll, so every HA entity flipped to unavailable for each "try again later" reply from the SAIC server. The next poll usually succeeds.The vehicle is now marked
offlineonly after 3 consecutive failed polls. A successful poll resets the count. Vehicles removed from the API list still go offline immediately. Polling backoff and the last-error timestamp are unchanged.Why 3: I measured failure runs in about 220k logged status API attempts (Mar 2024 – Oct 2026, one vehicle, grouped into 91,918 polls, 3.2% failed). 82% of failure runs are a single failed poll.
3 removes 89% of the flaps. Going higher adds little and delays real outages. Caveats: one vehicle, and polls were grouped by a 20 s gap rather than from the gateway's own failure marks.
Closes #313