esphome / esphome/feature-requests
Built-in support on the HA divice page to enable/disable Deep Sleep
- 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**
I'd like built-in support on the HA device page to enable/disable Deep Sleep
**Please describe your use case for this integration and alternatives you've tried:**
Current to enable Depp Sleep control requires creating a Helper function, and a text sensor on the device that reacts to changing values in the text value of the helper function. This works but is kludgy and requires the device to recognize specific text to determine if the control is targeted to that device. As Deep sleep is vital functionality to optimize the use of battery-powered devices I think this should be built into the the device code. If a device doesn't implement Deep Sleep, it will disregard this setting
**Additional context**
A binary flag like Disable Sleep would be set to true/false in the HA UI for each device and the device would automatically get the value of this setting upon waking when the API connects and optionally respond by enabling or disabling Deep Sleep mode via a on_sleep_control: configuration in the deep_sleep module using existing sleep control: deep_sleep.prevent, deepsleep.enable, and -deepsleep.enter. This would have to ensure that all routines are executed before going to sleep.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by locating the Home Assistant device-page implementation and the deep_sleep module referenced in the request. Read how existing sleep controls and API updates are handled; done would mean a per-device UI setting is delivered on wake, supported devices can enable or disable deep sleep, and existing routines still complete before sleep.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100