Loose Wires
Every time my wife informed me, “The exhaust fan in the bathroom is not working,” I got stressed out a little. Why did the fan stop working again? I changed the new switch. I sealed the cover to keep moisture from getting into the electrical box.
I searched up YouTube and one of the suggestions was checking the loose wires. I removed the fan and checked the house box. Both the ground and the negative wires were completely out of the wire nuts. Nevertheless the fan kept working on and off for months.
I replaced the wire nuts and made sure the wires were tightly and securely connected. It was such a dumb mistake that only someone who had no confidence in fixing things around the house could make.
I am glad I found the issue and fixed it before I called an electrician.