In the following code i would like to write into a helper, but i am not able to do it … can someone give me an example?
Thanks for your help
prevent deep sleep
binary_sensor:
- platform: homeassistant
id: start_deep_sleep
name: Prevent Deep Sleep
entity_id: input_boolean.do_sleep
script:
- id: consider_deep_sleep
mode: queued
then:- delay: 60s
- if:
condition:
binary_sensor.is_on: start_deep_sleep
then:
- logger.log: ‘Start deep_sleep …’
!!! Here i want to write into a helper ‘deepsleep_status’, but i am not able to do it !!!
- deep_sleep.enter: deep_sleep_bewaesserung
else:
- deep_sleep.prevent: deep_sleep_bewaesserung
- logger.log: 'Skipping sleep, per prevent_deep_sleep'
- script.execute: consider_deep_sleep
deep_sleep:
id: deep_sleep_bewaesserung
run_duration: 1min
sleep_duration: 3min