esphome / esphome/feature-requests

Deep sleep enter : make "until" templatable or add a set_time_until parameter

Open
#2,532 10 comments 0 reactions 0 assignees View on GitHub
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 use an ESP32-S2 to control the power of a battery powered device using Home Assistant and a Calendar to turn off or turn on the device. To minimize consumption, i want to set the ESP32 in deep sleep mode until the start (or the end) of the next event using the internal RTC clock.

**Please describe your use case for this integration and alternatives you've tried:**

I tried to set the "until" parameter of deep_sleep.enter action using lambda but this parameter is not templatable. I searched to build a DeepSleepEnterAction using lambda code but i could not find any exemple, i saw interesting function like set_until(hh,mm,ss) but did not managed to use it.

**Additional context**

I saw another merged pull request for adding "deep sleep duration" as parameter of deep_sleep.enter function, maybe we should do something similar for until and time_id "set_until(time_id, hh, mm, ss)"

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the deep_sleep.enter action and the DeepSleepEnterAction implementation, then compare the existing set_until(hh,mm,ss) and the merged deep sleep duration parameter mentioned in the request. Define whether the completed feature makes until templatable, adds set_time_until, or supports set_until(time_id, hh, mm, ss), and verify the chosen behavior with the ESP32-S2 use case.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.