esphome / esphome/feature-requests
Wifi Switch
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
Ability to switch wifi chip on and off at will
**Please describe your use case for this integration and alternatives you've tried:**
Primary use case is to toggle wifi with a hardware switch to save battery. Would also like to toggle wifi in code when for eg a condition is met to update MQTT/HA (again to save battery)
Have investigated use of deep sleep but other functions are still required when wifi is not therefore doesn't suit my use case.
Have tried below (undocumented lambda) which does seem to take wifi down briefly but guess API is bringing it back up automatically.
- lambda: WiFi.mode(WIFI_OFF);
- lambda: WiFi.mode(WIFI_STA);
**Additional context**
Contributor guide
No contributing guide indexed for this repository
Research direction
The request does not name files or tests; start by locating ESPHome's WiFi integration and reviewing how the shown WiFi.mode calls interact with its API. Validate behavior on the targeted ESP8266 or ESP32 hardware, including MQTT or Home Assistant updates while WiFi is disabled; done means WiFi can be switched off and on deliberately without being restored unexpectedly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot, networking
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100