I’m trying to create a helper script to automate the opening/closing of my garage doors. The idea is to be able to flick the opener lights on and off using ratgdo ahead of closing the door with the cover.close command, perhaps make an alexa announcement that the doors are closing in x seconds, etc.
anyway, I am just beginning with it but I am having a hard time getting the first pass of the script to save, I get the dreaded “extra keys not allowed” error message. Can you guys help? Here is the script. What did I do wrong? Don’t worry too much about what the script actually does, I’m just trying to figure out where I went wrong in the syntax to get the darn thing to save.
Thanks. That wasn’t enough to get it to work. I ended up having to be very verbose and include “conditions:” before each “condition” and finally got it to compile. Here is the corrected script in case it helps anybody else.
You can make it significantly more concise by assigning variables and using a few templates. The following should be functionally equivalent to what you posted, though it contains a few unused variables…
Nice, use a mapper to help match the ratgdo to the door. A lot more elegant.
I kept having trouble with the variable service calls but was able to get it working using different syntax. I found myself using the visual editor a lot more than I had thought, I keep messing up with the syntax in yaml mode.
Tanks for the help! Here is the code in case it is useful to anyone.