Hello again @123, I’m finally working on moving to the newest Hassio version.
I have a question about Condition OR statement with dates. I’m getting an error when using this condition statement below. How do you write Condition OR the proper way?
What I’d like to do is to trigger the birthday script on either those dates, 1 hour after sunset. But it’s giving me an error. Also is the repeat while statement correct? I want the lights to turn off at 3AM.
Also another question, what is the easiest way to write “month, day, year” in condition statement?
Like for example, I’d like to setup Condition OR statements for the dates:
Thanks! That’s what I was actually wanting to create. I was doing the condition like: and it won’t work. Now I’m almost near the end of finishing on moving to the newest version. Thanks again!
I even thought the year, month, day condition I was writing was wrong, so I asked – turns out what I wrote was the same as yours. It was just the condition – I don’t need to write condition in every line.
I’m testing this light automation / script. And I’m not sure why it’s not looping. What I’d like to do is to loop the light changing from cyan to magenta, on repeat, until 4PM. But testing it now, it doesn’t loop. And it stays on in magenta after changing from cyan.
Removing the “wait_template” turns off the light after the sequence. So maybe it’s the wait_template not working? But how can I keep it looping until 4PM?
It didn’t loop because there was nothing in the automation or script that would make it loop.
As you have discovered, you must use repeat to perform looping.
A convenient way to control the looping, namely to stop looping, is to add another condition to while that depends on an input_boolean’s state (i.e. it must be on to permit looping).
while: "{{ (now().hour > 13 or now().hour < 4) and is_state('input_boolean.whatever', 'on') }}"