I'm hoping someone can help me figure out a puzzling problem with a light switch and overhead light. I have only basic handy homeowner knowledge of electrical issues, meaning I can install switches and fixtures but I don't know much when it comes to troubleshooting. Sorry for the long setup here, but I'm trying to give you an accurate picture. In an entryway from the garage, I have an overhead light fixture that I'd like connected to a motion sensor switch. I had that setup for years but it never worked quite right. The lights would flicker and sometimes would stay on at a low level when the motion sensor was not activated. It also seemed that light bulbs burned out quickly in this fixture, so I ended up using various types of bulbs in the fixture as I replaced them. I could not see any improvement in the issues, though I've learned through some reading that the low level constant on may be related to LED bulbs. More recently I decided I wanted to fix this problem once and for all. I thought maybe the motion sensor switch was bad, so I replaced it with a new one. The problem persisted. So I thought maybe the problem was with the light fixture. I removed the old one and saw that the visible wires connecting to the light bulb sockets were severely degraded, with the wiring exposed in a couple places. (This fixture had been in place about 12 years.) As I prodded the wiring, it was so brittle that it just fell away and exposed large sections of the wiring. I found this very concerning as a fire hazard, of course, so I was glad to be replacing the fixture. I installed a new fixture (fixture B), and I now had a new motion sensor (sensor 2). So both new components. The flickering continued, and the motion sensor only worked intermittently. Sometimes I'd walk by and hear the click of the motion sensor activating, but the light would not come on. Sometimes it would come on a minute or two later. Other times it would seem to work properly. A more knowledgeable friend suggested that maybe the bad wiring in the original light fixture was the culprit and since fixture A was still in place when I installed sensor 2, maybe fixture A had somehow damaged sensor 2. So now sensor 2 was the problem, we suspected. To test that, I removed sensor 2 and replaced it with a simple toggle light switch. The switch turned the light on and off properly, but there still was flickering when fixture B was on. At that point I had become very uneasy with the idea of some sort of wiring issue that could be dangerous, so I just removed the toggle light switch, capped the wire ends, and closed up the wall plate. I welcome any thoughts or suggestions.