Turn on lights

Would the proximity sensor work with a grill in front of it? For design reasons. And could it be painted? I want this to be an definitive solution.