As Broadreach said, definitely a redundant ceiling fan controller. It doesn't look like it's a hazard so if it's not an annoyance I'd just leave it. If you're going to disconnect and remove it turn off the power first at the main isolator switch in the CU.