I need to stop lights turning on while baby is sleeping

In order for double tap to work, you have to have a smart switch that will transmit the double tap. What model switch are you using? If you already have a switch installed that will transmit a double tap, then the existing double tap SmartApp might be a place to start. #6 under convenience in the following topic.

Yet another option is a mode control toggle. You can use this as a wall switch or just on the table. I really like it.