esphome / esphome/feature-requests

Before Deep sleep enter send action to ha

Open
#2,095 1 comment 0 reactions 0 assignees View on GitHub
component: 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**
Hello.
it is possible to implement a function that would send the function to the home assistant just before starting deep sleep and only then disconnect the wifi.

Something similar to the on_shutdown function, which, however, is not completely reliable, sometimes sends and sometimes does not send a command via wifi.

something along the lines of:
```
if:
condition
deep_sleep.before_enter: component_name
then:
switch.turn_on: ...
```

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

**Additional context**

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the existing on_shutdown behavior and the deep-sleep lifecycle, focusing on when Wi-Fi disconnects and deep sleep begins. Define how a before-enter action would be invoked and how completion would be confirmed; done means the Home Assistant command is sent reliably before disconnection and deep sleep.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.