PIR Wall Switch Occupancy Sensor not working WSP-250
Unless the directions state that the use of a pencil is the proper way to operate the switch, you should replace it. The rattling sound would also be a reason for replacement. Don't chance it arcing because the internal contacts aren't connecting right. Take some pictures of the switch before disconnecting any wires. That way we can better assist you if you have some trouble. Many questions on this site are because someone disconnected something and cannot remember how to reconnect it. Pictures are worth a thousand words. turn off the breaker to the circuit before doing anything. Good luck.