[wifi] Warn when AP is configured without captive_portal or web_server - #13087
Conversation
|
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#13087
components: [wifi]
refresh: 1h(Added by the PR bot) |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #13087 +/- ##
=======================================
Coverage 73.76% 73.76%
=======================================
Files 53 53
Lines 11328 11328
Branches 1538 1538
=======================================
Hits 8356 8356
Misses 2572 2572
Partials 400 400 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Memory Impact AnalysisComponents:
This analysis runs automatically when components change. Memory usage is measured from a representative test configuration. |
There was a problem hiding this comment.
Pull request overview
This PR adds a warning when WiFi Access Point (AP) mode is configured without either captive_portal or web_server components. The intent is to help users identify potential misconfigurations where an AP would serve no practical purpose for web-based configuration or monitoring.
Key changes:
- Adds validation logic to warn when AP is configured without
captive_portalorweb_server - Refactors
final_validate()to storefull_configonce instead of callingfv.full_config.get()multiple times for improved efficiency
|
thanks |
What does this implement/fix?
Adds a warning when WiFi AP mode is configured but neither
captive_portalnorweb_serveris enabled.Without either of these components, the AP serves no practical purpose - users cannot:
captive_portal)web_server)This mirrors the existing warning in
captive_portalthat warns when it's enabled withoutwifi.ap.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:Warning message:
To fix, add either:
Checklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: