I have a question for a simple automation. I used google to solve the problem on my own but I failed to create the automation correctly.
I want to close my window cover when the sun goes down. Thats clear and working. Now I want to add a button which cancels the process so that the covers stay open. For this scenario I created a button (on or off). The automation should do the following:
If the sun goes down and the cancel button is on, set the cancel button to off and do nothing else. If the cancel button is off close the cover. I want to use this for my garden door. I want to prevent to close the cover when I’m outside. I hope you understand, what I mean. The problem is that I don’t understand the yaml coding. Is there a good manual (except the manual from Home assistant) to read so I can learn this? This is my code. Sorry in advance for the completely wrong code but I don’t know better:
thank you for your help. I corrected the code as you described and the configuration check is ok now. I will check the automation today. Only one wrong character produces this big error message.
I want to understand the error messages and indeed the yaml scripting. Do you have any tips where I can find good material?
I received the following error in log and the automation didn’t work:
homeassistant.exceptions.HomeAssistantError: Error rendering service name template: UndefinedError: ‘input_boolean’ is undefined
I googled and got the information, that the input_boolean.rollo_az_aussetzen has to be set like this ‘input_boolean.rollo_az_aussetzen’. I corrected that and now it’s working fine. Thank you Koying for your time and your help. Here is the code which is working fine if someone want to do something similar
Hello Koying, may I ask you again for help? I have more covers to control and I want to use buttons to prevent the closing process for each cover. I tried the code below but now nothing happens and I don’t have an error in my log file. I found many if then else codes via google but in every threat they use only one template. But how can I solve it using 2 or more templates? I tried and changed code for hours but I don’t have any idea how to solve it. Can you please give me an advice? Thanks in advance!!
Thank you for your answer. I tried your suggestion (I created a file named TEST.yaml) but I receive the following error
Error loading /config/configuration.yaml: while scanning for the next token
found character ‘%’ that cannot start any token
in “/config/custom_automation_dir/TEST.yaml”, line 8, column 8