Motion sensor with condition

Im using GUI to build motion scene. I want to turn on lights (Leffa ETU and Leffa TAKA) when motion is detected and keep light on for 5 sec after motion. BUT Only if Shield Medial player is PAUSED, IDLE OR STOPPED.

Motion works, but my conditions are not… =( Please help. GUI for building automation is not ready for dummies…

alias: Liiketunnistin kellarissa ehdolla
description: ""
trigger:
  - type: motion
    platform: device
    device_id: 8829d81c6669b4015270f4f006d4aabe
    entity_id: binary_sensor.presence_42
    domain: binary_sensor
    for:
      hours: 0
      minutes: 0
      seconds: 5
  - platform: state
    entity_id:
      - media_player.shield
    to: idle
  - platform: state
    entity_id:
      - media_player.shield
    to: paused
  - platform: state
    entity_id: []
    to: stopped
condition: []
action:
  - type: turn_on
    device_id: f2287f854e76ab10c28d97c540d3dd78
    entity_id: light.leffanauha_etu
    domain: light
  - type: turn_on
    device_id: 5f8e2e542aa5c1bf751c5c8efd1ca9ca
    entity_id: light.leffanauha_taka
    domain: light
mode: single `

You have your media player changing to idle, paused, or stopped as triggers when these need to be under the condition section. The media player stopped trigger also has the entity_id set to null so this might throw an error.

Try deleting the 3 media player triggers then add an “OR” condition where you can include the 3 valid media player states (idle, paused, and stopped).

Thank you. I have been trying but it seems pretty hard to make it work. Visual editor is not giving all tools, but ill try to edit manually.

FOllow up is then to do separe automation with light sensor… To test this im using different lights:

alias: kellari valosensori
description: Firetablet valosensori sytyttää leffavalot
trigger:
  - platform: numeric_state
    entity_id: sensor.lightlevel_43
    below: 100
    above: 1
    attribute: ""
condition: []
action:
  - type: turn_on
    device_id: d14fcb237295f05596fc85832d7a223c
    entity_id: light.kellari_leffavalot
    domain: light
  - type: turn_on
    device_id: 48ccd59ec62c92c50c0c669280706c97
    entity_id: switch.kellari_portaat
    domain: switch
mode: single

IT does not work… Im covering up sensor and i can see value 11.8lx… but nothing happens.