Need some guidance with motion-based plus condition based lighting

The goal is to have the living room lamps turn on when motion is detected from 12am to 9AM if nothing is playing on TV. But it never get triggered for whatever reason unknown to me.

When i check the history i see movement but nothing gets triggered. Please Help.

- id: '1612311872411'
  alias: Motion - Turn on living room light in the morning
  description: From midnight to 9am everyday
  trigger:
  - platform: state
    entity_id: sensor.zooz_zse40_4_in_1_sensor_burglar
    from: '0'
    to: '8'
  condition:
  - condition: state
    entity_id: media_player.living_room_2
    state: idle
  - condition: state
    entity_id: media_player.living_room_2
    state: paused
  - condition: time
    after: 00:00:00
    before: 09:00:00
  action:
  - service: light.turn_on
    data: {}
    entity_id: group.living_room_lamps
  mode: single

conditions are by default and thus both has to be true at the same time. I dont think that is possible.

Thanks for the help … Is there a better way to approached this. like is there a way to turn multiple states into one. I ended up creating multiple automation one for “paused” and one for “idle” and that worked right away.

You can define a not condition:

You can use OR and AND conditions, like explained in the documentation. This can even be done using the UI editor:

PS: Actually you can define multiple states in a state condition, so this should work, too. Also, omitting before: or after: in a time condition is from/to midnight

condition:
  - condition: state
    entity_id: media_player.living_room_2
    state: 
      - idle
      - paused
  - condition: time
    before: 09:00:00

That worked as well… Appreciate the help guys

Below is what i ended up with:

- id: '1612364183699'
  alias: Motion - Turn on living room light in the morning
  description: 'From midnight to 9am everyday '
  trigger:
  - platform: state
    entity_id: sensor.zooz_zse40_4_in_1_sensor_burglar
    from: '0'
    to: '8'
  condition:
  - condition: state
    entity_id: media_player.living_room_2
    state: idle,paused
  - condition: time
    after: 00:00:00
    before: '10:00:00'
  action:
  - service: light.turn_on
    data:
      brightness: 255
      rgb_color:
      - 255
      - 181
      - 108
    entity_id: group.living_room_lamps