If possible, set a box in the wall next to the door switch location. If in a closet, put the box facing the inside of the closet. Use a short raceway like 3/8 NM flex between the box and the door switch. You can use short #12 stranded between the box and switch. You really appreciate this setup if you ever have to replace the DS. Allows you the adjust the slack in the door switch box. Just use a blank sg cover. The problem with those switches is the wiring has to be installed before the door jam is in. They install the door jams after the drywall is installed. Make sure you make a large hole in the door frame to accommodate the door switch box. Just leave the flex hanging out the hole. After the door jam is installed, all you have to do is cut the door jam for the box and not the door frame.