I have replaced my bathroom extractor fan with a new model. The new model comes with a single-gang controlled switch which is wireless. You can slot it into the 1-gang box, but it doesn't need any wiring in. It takes a AAA battery.
Currently I still have the old switch in box, and the wireless just sits on the counter.
Does it violate any electrical code (I'm in CT, USA) if I just wire-nut and tape up the wires in the box, and remove the old switch? What's the best way to permanently join those wires. I'd actually like to do it all correctly.
Wall control is section 11: https://images.homedepot-static.com/catalog/pdfImages/85/85b96547-666a-4f8e-a586-4c4ecfc0b214.pdf
The wall control unit feels too big, if there's an existing switch behind the front panel.