-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
[http_request] Skip update check when network not connected #12418
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
[http_request] Skip update check when network not connected #12418
Conversation
Prevents noisy error logs on startup when the http_request update component attempts to fetch the manifest before WiFi is connected. The scheduler triggers the first interval update within 0-5 seconds of setup, but WiFi typically takes 5-10+ seconds to connect. This change silently skips the update check (with a DEBUG log) when the network isn't ready, relying on the regular polling interval or manual update.check action to check once connected. Closes esphome#12416 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
To use the changes from this PR as an external component, add the following to your ESPHome configuration YAML file: external_components:
- source: github://pr#12418
components: [http_request]
refresh: 1h(Added by the PR bot) |
|
👋 Hi there! I've automatically requested reviews from codeowners based on the files changed in this PR. @jesserockz - You've been requested to review this PR as codeowner(s) of 1 file(s) that were modified. Thanks for your time! 🙏 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #12418 +/- ##
==========================================
- Coverage 72.58% 72.56% -0.02%
==========================================
Files 53 53
Lines 11189 11192 +3
Branches 1516 1517 +1
==========================================
Hits 8121 8121
- Misses 2675 2677 +2
- Partials 393 394 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Memory Impact AnalysisComponents:
📊 Component Memory Breakdown
🔍 Symbol-Level Changes (click to expand)Changed Symbols
New Symbols (top 15)
This analysis runs automatically when components change. Memory usage is measured from a representative test configuration. |
|
Thanks |
Co-authored-by: Claude <noreply@anthropic.com>
What does this implement/fix?
Prevents noisy error logs on startup when the
http_requestupdate component attempts to fetch the manifest before WiFi is connected.The scheduler triggers the first interval update within 0-5 seconds of setup (due to
MAX_INTERVAL_DELAY = 5000ms), but WiFi typically takes 5-10+ seconds to connect. This causes the update component to fail with errors like:This change adds a
network::is_connected()check at the start ofupdate()that silently skips the update check (with a DEBUG log) when the network isn't ready. The regular polling interval (default 6 hours) will check once connected, or users can trigger an immediate check viawifi.on_connect+update.checkaction.Types of changes
Related issue or feature (if applicable):
Pull request in esphome-docs with documentation (if applicable):
Test Environment
Example entry for
config.yaml:Checklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: