I am trying to get a simple (I think!) automation (which turns on a light) to run every day, except on October 31st where I want to delay it by 5 hours. I thought I had set it up properly, but it did not work this past October 31st, and the light turned on when I did not want it to. Can someone point me to the error/problem in the code below and suggest a correction? Thanks!
For future reference, it’s inadvisable to use long delay statements (5 hours qualifies as long). If Home Assistant is restarted during the delay’s countdown, the automation is terminated immediately and the delay is aborted. On restart, the terminated automation does not resume from the point it was terminated.
Thanks both. I see the extra quotes, but I cannot figure out how to remove them. I set up the automation in the GUI using “Conditionally execute an action and default to another action” and then “If template renders a value equal to true”, and it added the double quotes and single quotes automatically. When I edit to remove the quotes and resave, they reappear. Any suggestions?
I just used the Automation Editor, in Visual Mode, to create a Template Condition and it did not add double and single quotes automatically. It wrapped my template in double quotes only.
Thanks. When I look at the automation configuration (under automation - traces - automation configuration (which is where I copied from in my first post)), it shows the combination single and double quotes. But when I choose “edit in yaml”, only the double quotes show up. So now I am not sure what is going on.
While editing the automation in the Automation Editor, switch its mode from visual to YAML. That’s what I displayed in the screenshots visible in my previous post. That’s where my testing shows no automatic inclusion of two kinds of quotes.
Anyways, I suggest you replace your existing automation with the one Didgeridrew suggested because it is more robust (does not use a 5 hour delay statement).