From 4a3b62894659e69aca302ade9ca1b7e8e61295e8 Mon Sep 17 00:00:00 2001 From: pistifonok <57877162+pistifonok@users.noreply.github.com> Date: Wed, 7 Dec 2022 03:59:25 +0100 Subject: [PATCH] Fixed deep sleep for ESP32C3 (#4143) Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com> --- esphome/components/deep_sleep/deep_sleep_component.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esphome/components/deep_sleep/deep_sleep_component.cpp b/esphome/components/deep_sleep/deep_sleep_component.cpp index 2261106b12..f6472a123c 100644 --- a/esphome/components/deep_sleep/deep_sleep_component.cpp +++ b/esphome/components/deep_sleep/deep_sleep_component.cpp @@ -147,7 +147,7 @@ void DeepSleepComponent::begin_sleep(bool manual) { if (this->wakeup_pin_mode_ == WAKEUP_PIN_MODE_INVERT_WAKEUP && this->wakeup_pin_->digital_read()) { level = !level; } - esp_deep_sleep_enable_gpio_wakeup(gpio_num_t(this->wakeup_pin_->get_pin()), + esp_deep_sleep_enable_gpio_wakeup(1 << this->wakeup_pin_->get_pin(), static_cast(level)); } #endif