Invert time condition for automation

Hey all,

Im sure this is an easy one, but I just want to make sure there is no easier or smarter way to do it

My time condition is to NOT run the automation during Friday nights after 15:00 till 07:00, or is this doing Saturday night as well?

TIA!

  - condition: time
    weekday:
      - mon
      - tue
      - wed
      - thu
      - sun
  - condition: time
    weekday:
      - fri
      - sat
    after: '07:00'
    before: '15:00'

Your conditions will never be true. You have:

(is mon to thur, or sun) AND (is fri or sat)

It can never be both those days. Try this:

  - condition: not
    conditions:
      - condition: or
        conditions:
          - condition: time
            weekday:
              - fri
            after: '15:00'
          - condition: time
            weekday:
              - sat
            before: '07:00'

To pass this condition it must not be between 3pm and midnight on Friday, OR not be between midnight and 7am on Saturday. If it is either of those times the condition will not allow the actions to occur.

Awesome! I think that works, and I can see how that works, which is maybe even more important LOL

Thank you :slight_smile: