- id: '1576684838552'
alias: Bathroom on Motion Timed
description: ''
trigger:
- entity_id: binary_sensor.motion_sensor_158d0002f07f28
for: '00:01:30'
platform: state
to: 'off'
condition:
- condition: state
entity_id: binary_sensor.door_window_sensor_158d00035ac62a
state: 'off'
action:
- data:
entity_id:
- media_player.googlehome4082
- light.64341605b4e62d5e979e
service: homeassistant.turn_off
This will turn off the media player and light when the motion sensor goes to on and then to off and then stays off for 1:30, if after the 1:30 the door is closed.
Yes, I do. Because you didn’t say you wanted the music and light to turn off when the door gets closed. You said you wanted them to turn off 1:30 after the sensor stops detecting motion, if at that time the door is closed. Those are two different things.