Hello
I have an ESP32-c3 with a sensor and have activated deep sleep. For a better maintainability I have a script and helper as a binary sensor. If I switch on the binary sensor the script skips the deep sleep.
This works fin.
But now I want to use two more ESPs with the same configuration. The basic works fine, but I jumps not into the skiping modus if I turn on the switch.
Here the code of the helper and the script:
binary_sensor:
- platform: homeassistant
id: prevent_deep_sleep
entity_id: input_boolean.deep_sleep
script:
- id: consider_deep_sleep
mode: queued
then:
- delay: 10s
- if:
condition:
binary_sensor.is_on: prevent_deep_sleep
then:
- logger.log: 'Skipping sleep, per prevent_deep_sleep'
- deep_sleep.prevent: deep_sleep_control
else:
- deep_sleep.enter: deep_sleep_control
- script.execute: consider_deep_sleep
Why the script work at the first ESP but not at the other two.
Thanks for your help