i read a lot, of course, and also try out a few things. but now I need some food for thought.
I would like to execute two actions (call service) with a time delay with a button on the front end.
once the command cover.cover_close should be executed immediately when the button is pressed and 10 seconds later cover.cover_stop
my motors are mechanical and not electric. so i cannot determine the position. there is only up or down. To watch TV in the strong sun, I want to move it to a certain position.
the hint helped me a lot, it works without any problems. Script created with a timeout that executes the second action after it has expired. All binded to a Button
hey I have something else that I can’t find a solution to. if the roller shutter is lowered, I would like to query a variable X and a condition, whether this is 0, if so set it to 1. it’s not that easy, is it? Unfortunately, I couldn’t make any sense of the documentation.
Sth Like this:
alias: kino
variables:
x: '{{ 0 }}'
sequence:
- condition: "{{ x < 1 }}"
- service: cover.close_cover
But this Result is a Parser Error. What did i wrong?
it’s so much more complicated than c+ or php😁
Variables are not stored in automations, they are just a find and replace for in the automation. But I think what you’re looking for is an input_boolean helper.
hey you are my man.
input_boolean was a great tip. together with the script I was able to implement my Toogle switch.
“shut down shutters, wait 10 seconds, stop shutters, set boolean to on and vice versa”
Several queries packed in two options with condition (input boolean on / off) thank you very much