Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions content/components/deep_sleep.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ params:
{{< anchor "deep_sleep-component" >}}

The `deep_sleep` component can be used to automatically enter a deep sleep mode on the
ESP8266/ESP32 after a certain amount of time. This is especially useful with nodes that operate
ESP8266/ESP32/BK72xx after a certain amount of time. This is especially useful with nodes that operate
on batteries and therefore need to conserve as much energy as possible.

To use `deep_sleep` first specify how long the node should be active, i.e. how long it should
Expand All @@ -20,7 +20,7 @@ Next, tell the node how it should wakeup. On the ESP8266, you can only put the n
for a duration using `sleep_duration`, note that on the ESP8266 `GPIO16` must be connected to
the `RST` pin so that it will wake up again. On the ESP32, you additionally have the option
to wake up on any RTC pin (`GPIO0`, `GPIO2`, `GPIO4`, `GPIO12`, `GPIO13`, `GPIO14`,
`GPIO15`, `GPIO25`, `GPIO26`, `GPIO27`, `GPIO32`, `GPIO39`).
`GPIO15`, `GPIO25`, `GPIO26`, `GPIO27`, `GPIO32`, `GPIO39`). BK72xx can be woken-up using timer (with the maximum value of 36 hours) and/or with one or more non-strapping pins.

While in deep sleep mode, the node will not do any work and not respond to any network traffic,
even Over The Air updates. If the device's entities are appearing as **Unavailable** while your device is actively
Expand Down Expand Up @@ -58,6 +58,11 @@ deep_sleep:
the wakeup pin is already in the state with which it would wake up when attempting to enter deep sleep.
See [ESP32 Wakeup Pin Mode](#deep_sleep-esp32_wakeup_pin_mode). Defaults to `IGNORE`

- **wakeup_pins** (*Optional*): Only on BK72xx. Similar to the `wakeup_pin`, but allows specifing multiple pins as a list. Each entry in the list should consist of:
- **pin** (**Required**, [Pin Schema](/guides/configuration-types#pin-schema)): A pin to wake up to once in deep sleep mode. Use the inverted property to wake up to LOW signals.
- **wakeup_pin_mode** (*Required*): Specify how to handle waking up from the `pin` if
the it is already in the state with which it would wake up when attempting to enter deep sleep.
See [Wakeup Pin Mode](#deep_sleep-esp32_wakeup_pin_mode). Defaults to `IGNORE`
- **id** (*Optional*, [ID](/guides/configuration-types#id)): Manually specify the ID used for code generation.

Advanced features:
Expand All @@ -76,9 +81,9 @@ Advanced features:

{{< anchor "deep_sleep-esp32_wakeup_pin_mode" >}}

## ESP32 Wakeup Pin Mode
## ESP32/BK72xx Wakeup Pin Mode

On the ESP32, you have the option of waking up on any RTC pin. However, there's one scenario that you need
On the ESP32 (and BK72xx), you have the option of waking up on any RTC pin. However, there's one scenario that you need
to tell ESPHome how to handle: What if the wakeup pin is already in the state with which it would wake up
when the deep sleep should start? There are three ways of handling this using the `wakeup_pin_mode` option:

Expand Down