Same goes for power supplies, battery pack supplies, phones, and tablets - they all can impact the compass. I've seen a battery pack power supply on top of the coaming impact a compass at 20cm.
People also need to be wary where an electronic compass unit is mounted behind a panel for those with digital instruments, then they also put some other electronics nearby and don't check.
Always fun to pick up paperclips with a phone or tablet to see where they hide them, for either case detection or where the gizmo that makes it vibrate is inside.