The door_window sensors use ‘on’/‘off’ (note the single quotes) not “open”/“closed” same for the motion sensors ![]()
Normally the automation would look like similar to this…
- alias: 'Turn on hall light when there is movement'
initial_state: 'on'
trigger:
- platform: state
entity_id: binary_sensor.motion_sensor_158d000125a67b
to: 'on'
action:
- service: light.turn_on
entity_id: light.bathroom_light