I want to install a simple motion sensor (Lutron Maestro MS-OPS2) on a single pole switch in my garage. When I installed it the light would not turn off. The instructions (PDF) that come with the motion sensor say this is a result of the ground not being connected (PDF). I double checked and the sensor was connected to the ground wire (bare copper wire) coming into the box. Does this mean that my ground wire is not connected to anything on the other end? How can I ground this switch so that I can get my motion sensor to work properly?
This type of switch requires a small amount of power to operate, and since there is not always a return path available for constant power. This switch uses the grounding conductor as a current carrying conductor, and dumps a small amount of power to the grounding conductor. It's not the best design; in my opinion, but if the standards and safety organizations approve it it must be safe.
Because of this awful design, a solid connection to earth is required for this switch to function. Which in your case, seems to be missing. It sounds like there is a grounding conductor included in the cable assembly at the switch box, so I'd start by tracing the cable back to where it originates. Follow the cable back to the nearest junction, whether that be another device or the service panel. Open up the junction point, and inspect the wiring. If everything looks good at that point, continue back down the line until you reach the service panel. You can use a tool like this Multi-Purpose Wire Tracer, to help trace the line through walls and ceilings.
If you reach the service panel, and all the connections along the way looked good. It means you likely have a break or some other damage to the grounding conductor inside the cable assembly. If this is the case, you'll have to locate the damaged section and replace it.