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).