This alarm uses an electronic switch and a pair of sensor wires that detect water (no moving parts to fail or stick). If the sensor wires are set just above an automatic emptying pump it will warn that the pump has failed, or is blocked, or water is coming in faster than your pump can empty it.
eBay