Electrical Questions? Ask an Electrician Online.
Hi, I'm Mike G and I'll be assisting you. Removal of an electrical fixture or device, capping the wires and putting a cover on the opening is acceptable and safe.
With the wires capped and covered at the ceiling, the switch can be left as is. Nothing further necessary.