You either have a 3 way switch or your box is wired for separate light and fan. Are there 1 or 2 wall switches? If 1, is it without the ON and OFF markings? If so, it is a 3 way switch connected to another switch in the room. If it is a 3 way, you have a loose wire somewhere if only a loose red is seen. If 2 separate single pole switches-with ON and OFF markings, cap the red wire, then black to black and white to white. What was there before and how was it wired?
|