09-08-2023 03:37 PM
I keep getting this error when I try to use conditions in routines, even when I'm following the syntax in examples from the Google Developer Center. I'm happy to post some examples, but can anyone explain in general terms what might be causing this?
Thanks!
Answered! Go to the Recommended Answer.
09-11-2023 10:42 AM
In addition to @ir0nm8n's tip about using the "or" type operator, make sure you've got the "- type: " key for each condition you want to check. You can see an example in our help center article - just be sure to double check your indentation and use the Validate button to check that your script is properly formatted.
09-09-2023 03:24 PM
I'm rather new to it myself, but I think it might be in the condition part of your routine. If you can post your example it would be easier to say for certain, but you might be missing a
type: or
conditions:
value. In the "conditions:" an array (of conditions, listed with "-") is accepted. I think the regular "condition:" takes only one entry.
Hope it helps 🙂
09-10-2023 10:54 AM
Here's one example (just of the conditions section):
condition:
- type: time.between
before: sunrise
after: sunset
weekdays:
- MON
- TUE
- WED
- THU
- FRI
- SAT
- SUN
device: Light1 - Living Room
state: on
is: true
09-11-2023 10:42 AM
In addition to @ir0nm8n's tip about using the "or" type operator, make sure you've got the "- type: " key for each condition you want to check. You can see an example in our help center article - just be sure to double check your indentation and use the Validate button to check that your script is properly formatted.
09-12-2023 05:53 AM
It's missing "actions" before "device: Light1..."
12-24-2023 11:54 AM
Did you ever figure this out? I am having the same issue and can’t find a solution. My syntax seems correct but I get this error!
12-24-2023 12:41 PM
Never mind! I figured it out. I was using “- type:” but for a single condition (no “s”) you actually use “type:” (no hyphen). I was going insane for a second there!