Welcome to the community.
Thanks for your kind words.
If the bypass is ON (door open) the automation will be disabled. The problem you may have is because your using a contact sensor (door sensor) the auto OFF may not work as the contact is physically open.
You could create a template binary sensor but if you have a motion sensor in the bathroom why are you turning it ON when the door opens as the motion sensor will do this for you. Are you trying to keep the light ON when your in the bathroom and the door is closed? If so I have a nice template sensor called
Bee In The Hive.
Blacky ![]()