Open/Close Sensor embedded in the I/O board.
30 minutes - 1 hour
Dropped my mid-2012 MacBook Air 13" (A1466) with headphones plugged in. Since then, opening and closing the lid had no effect on whether or not the laptop would go to sleep. After reading two different articles on ifixit.com, I felt fairly comfortable that replacing the I/O card would rectify the problem.
I had already taken the MacBook apart four different times trying to diagnose the problem originally, so the step-by-step guides really weren't necessary for me, but I read them anyway and the high quality pictures and level of detail stepping you through the repair went way beyond any factory service manual. If you can find your exact device on this website, you can be assured you'll get no easier instructions elsewhere. This site is unique in that, most important, way. I've assembled IKEA furniture that was more difficult than this repair.
Follow the instructions. They didn't miss anything. Be careful! Keep a little tray nearby to hold the screws and small parts, and if you have any parts left over, go back and do it again. While this isn't true with many other laptops, Apple put every single screw on a MacBook in there for a reason. They all need to go back where they belong. Have fun!