Simple light automation not getting triggered

Heyya, maybe someone can give me a quick hint on what I am missing?

alias: Badezimmer 30/100
description: ""
trigger: []
condition: []
action:
  - if:
      - condition: and
        conditions:
          - condition: time
            after: "00:30:00"
            before: "08:00:00"
          - type: is_motion
            condition: device
            device_id: 4b85ee71925801220c87e30842796f26
            entity_id: binary_sensor.bad_hue_bm_motion
            domain: binary_sensor
    then:
      - type: turn_on
        device_id: ad6d80adb2b8932b007a55fe089a3c47
        entity_id: light.bad_hue_ww
        domain: light
        brightness_pct: 30
      - delay:
          hours: 0
          minutes: 0
          seconds: 30
          milliseconds: 0
      - type: turn_off
        device_id: ad6d80adb2b8932b007a55fe089a3c47
        entity_id: light.bad_hue_ww
        domain: light
    else:
      - if:
          - type: is_motion
            condition: device
            device_id: 4b85ee71925801220c87e30842796f26
            entity_id: binary_sensor.bad_hue_bm_motion
            domain: binary_sensor
        then:
          - type: turn_on
            device_id: ad6d80adb2b8932b007a55fe089a3c47
            entity_id: light.bad_hue_ww
            domain: light
            brightness_pct: 100
          - delay:
              hours: 0
              minutes: 5
              seconds: 0
              milliseconds: 0
          - type: turn_off
            device_id: ad6d80adb2b8932b007a55fe089a3c47
            entity_id: light.bad_hue_ww
            domain: light
mode: single

It isn’t being triggered because it hasn’t got a trigger! :grinning: Something has to happen to kick it off - in this case a change in state of the motion sensor, presumably. Something like:

trigger:
  - platform: state
    entity_id:
      - binary_sensor.bad_hue_bm_motion
    to: "on"