State on automation not firing

For some reason this is what I’m using to trigger the automation but it’s not firing…
What am I missing here? It’s meeting all the correct conditions but not working…

AHHHHHH correction if I comment out the last condition it works … Interesting…

- alias: 96 - Morning
  id: Morning
  trigger:
    - platform: state
      entity_id: binary_sensor.front_door_motion_occupancy
      from: "off"
      to: "on"
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: input_boolean.run_once
        state: "on"
      - condition: time
        after: "06:30:00"
        weekday:
          - mon
          - tue
          - wed
          - thu
          - fri
      - condition: time
        after: "07:00:00"
        weekday:
          - sat
          - sun

Any help or input would be appreciated :slight_smile:

Thank you!

You have the conditions all AND logic. It cant be a weekday AND the weekend at the same time. Perhaps you meant to use an OR condition?

  condition:
    - condition: state
      entity_id: input_boolean.run_once
      state: "on"
    - condition: or
      conditions:
        - condition: time
          after: "06:30:00"
          weekday:
            - mon
            - tue
            - wed
            - thu
            - fri
        - condition: time
          after: "07:00:00"
          weekday:
            - sat
            - sun

Oh I overlooked that … Thank you!!!

It’s working perfectly now :slight_smile:

1 Like