I am trying to make a lipo powered mailbox sensor using the esp32-c6 and deep sleep mode.
When I define the deep sleep and use the "esp32_ext1_wakeup" to define the pins, I cannot use the pins again in my binary_sensor. Validation flags the dual use of the pins as an error.
I have added the "allow_other_uses: true" in the pin settings, but it did not help. Does the order matter as I currently set deep sleep mode and definitions first then the binary sensor section.
I am using the latest versions of all tools:
Core 2026.6.4
Supervisor 2026.06.2
Operating System 18.0
Frontend 20260527.7
I have now tried reversing the order so that the allow_other_uses in the binary sensor section is first prior to sleep mode definition and it made no difference as I expected.
I found that i needed "allow_other_uses: true" in both the deep-sleep: section and the other place where the GPIO pin is defined, eg
deep_sleep:
id: deep_sleep_1
# wake up if it starts raining while asleep
wakeup_pin:
number: GPIO17 # wake up if a rain gauge pulse is detected
mode:
input: true
pullup: true
inverted: true # the pin is inverted in rain_gauge, so same here
allow_other_uses: true
sensor:
# rain gauge hardware sends pulses as the bucket tips.
- platform: pulse_counter
name: Rain Gauge
id: rain_gauge
pin:
# Reed switch between GPIO 17 and GND
number: GPIO17
inverted: true
mode: # prevent lots of ON/OFF events
input: true
pullup: true
allow_other_uses: true
# check the rain_gauge every minute while awake
update_interval: $update_interval_sensor
Mode and inverted also need to be the same in both places.
it doesn't matter which order things are in the yaml file.
Thank you Don,
That works if I only need wakeup on one pin, which I may resort to. (edited, see below)
Ideally I need to wake on two pins so I am using the esp32_ext1_wakeup component and it will not allow the allow_other_uses statement anywhere in its context or the deep_sleep context.
I have tried it in the commented out spots and within the pins: statement.
deep_sleep:
id: deep_sleep_control
# Automatically sleep 1 minutes after waking up
run_duration: 1min
sleep_duration: 5min
# External wakeup for ESP32-C6 using GPIO pins
wakeup_pin_mode: INVERT_WAKEUP
esp32_ext1_wakeup:
#allow_other_uses: true
pins:
- GPIO0
- GPIO2
mode: ANY_LOW
#allow_other_uses: true
After trying a bit more I found I had to format the pin naming differently and then the allow_other_uses works!
So your solution did work for me! Thank you again!
# Deep sleep configuration
deep_sleep:
id: deep_sleep_control
# Automatically sleep 1 minutes after waking up
run_duration: 1min
sleep_duration: 5min
# External wakeup for ESP32-C6 using GPIO pins
wakeup_pin_mode: INVERT_WAKEUP
esp32_ext1_wakeup:
pins:
- number: GPIO0
allow_other_uses: true
- number: GPIO2
allow_other_uses: true
mode: ANY_LOW