mirror of
https://github.com/esphome/esphome.git
synced 2025-02-24 13:58:14 +00:00
Upon registering for ESP32 deep sleep, DeepSleepComponent::begin_sleep calculates the level value to wake up on. As part of PR #2303, the level was changed to be based on `inverted` instead of `!inverted`: Before:1e8e471dec/esphome/components/deep_sleep/deep_sleep_component.cpp (L76)
After:2b04152482/esphome/components/deep_sleep/deep_sleep_component.cpp (L80)
The level argument to `esp_sleep_enable_ext0_wakeup(pin, level)` [0] should be 0 when the inverted property is true (low triggers wakeup), and 1 when inverted property is false (high triggers wakeup). Also revert the changes of #2644. [0] https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/sleep_modes.html#_CPPv428esp_sleep_enable_ext0_wakeup10gpio_num_ti