Week Day Time Condition

I’ve been searching and cant find a recent example… most are from a couple of years ago.

Is it still valid syntax or has it been depreciated?

condition:
    condition: time
  - weekday:
    - tue
    - wed

That has never been valid, check the docs

Ummm… So w/ after and before makes it valid… thanks glanced right over that

condition:
  condition: time
  # At least one of the following is required.
  after: '15:00:00'
  before: '02:00:00'
  weekday:
    - mon
    - wed
    - fri

notice that yaml syntax can’t have that line before “weekday”

You do not need before and after. As @yuvalabou mentioned it’s about the - in front of weekday.

1 Like

Are ya sure?.. I tried allot of permutations … guess I just missed that one…
So… this IS valid… I’ll give it a try

condition:
  condition: time
  # At least one of the following is required.
  weekday:
    - mon
    - wed
    - fri

Just to close the loop for posterity… the syntax below works just fine… Thanks all!

condition:
  condition: time
  # At least one of the following is required.
  weekday:
    - mon
    - wed
    - fri
1 Like

Perfect, thanks for the feedback. Please set the topic to solved as it might help others.