Disable WiFi when using Ethernet to save memory - #9456
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9456 +/- ##
=======================================
Coverage 59.60% 59.60%
=======================================
Files 50 50
Lines 10261 10261
Branches 1379 1379
=======================================
Hits 6116 6116
Misses 3786 3786
Partials 359 359 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Member
Author
|
Works great with my proxies |
kbx81
reviewed
Jul 12, 2025
Comment on lines
+345
to
+350
| # Disable WiFi when using Ethernet to save memory | ||
| if CORE.using_esp_idf: | ||
| add_idf_sdkconfig_option("CONFIG_ESP_WIFI_ENABLED", False) | ||
| # Also disable WiFi/BT coexistence since WiFi is disabled | ||
| add_idf_sdkconfig_option("CONFIG_SW_COEXIST_ENABLE", False) | ||
|
|
kbx81
approved these changes
Jul 12, 2025
Member
Author
Member
Author
|
Flashed pretty much every ethernet device I have. all good |
bdraco
marked this pull request as ready for review
July 12, 2025 05:16
bdraco
enabled auto-merge (squash)
July 12, 2025 05:17
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What does this implement/fix?
This PR explicitly disables WiFi in ESP-IDF when using the Ethernet component, resulting in significant memory savings. Since WiFi and Ethernet are mutually exclusive (enforced by
CONFLICTS_WITH = ["wifi"]), there's no need to compile in the WiFi stack for Ethernet-only configurations.Memory savings observed:
The change also disables
CONFIG_SW_COEXIST_ENABLE(WiFi/Bluetooth coexistence) since it's not needed without WiFi, providing additional memory savings for Ethernet+Bluetooth configurations.Types of changes
Related issue or feature (if applicable): N/A
Pull request in esphome-docs with documentation (if applicable): N/A
Test Environment
Example entry for
config.yaml:Checklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: