this must be obvious, but I cant find the solution to my challenge right away, so please have a look?
using this in a script:
- choose:
conditions:
condition: state
entity_id: sun.sun
state: below_horizon
sequence:
service: cover.close_cover
entity_id: cover.screen_keuken
default:
- wait_template: >
{{is_state('sun.sun','below_horizon') and
is_state('input_select.activity','Home theater')}}
- service: cover.close_cover
entity_id: cover.screen_keuken
I want the wait_template to stop and halt the script if
not is_state('input_select.activity','Home theater')
anymore.
can’t use the timeout for that, because that needs seconds/minutes. Don’t think I can add it in the wait template. Maybe it sounds more like a ‘while’, so I could wrap this whole section in a While? But this isn’t a loop, so that doesn’t really fit the bill either…
just asking what would be the most natural way of doing this.
thanks for having a look