Bathroom Lighting with contact sensor

Hi All,

Noob here. I was trying to automate bathroom lights using a contact sensor. I am trying to avoid a motion sensor as i want to avoid the akward hand movement when i am inside and it does not detect motion. I found a guide which says this can be achieved ,however strugling to get the Node-red part of the guide which can be found @ A twist on a contact sensor automation | Blog .
The flow can be found below, however i am strugling to identify the If node and what properties are to be passed.

Please assist.

Thank you

The wasp in a box sensor in hacs is what I use to tell if there is someone hanging out in my vestibule. It should work for the bathroom as well.

Thank you for replying!!

This talks about door sensor + motion sensor. I was hoping to achieve this with just a door sensor as indicated in the guide. Is there any way this can be achieved with just a door sensor ?

Iā€™m trying to think how you can tell if someone just opened the door, got something, and left vs staying in the room.

Wasp in a box looks for motion after the door is closed. If there is motion after the door closes, occupancy would stay on until it was opened again.

1 Like