I suppose you wish to detect water (flooding)? And that will start a pump operating?
(Asking for clarification, because humidity is a term for moist air.)
A float switch is a reliable, common method to turn a pump on and off. It is suitable for water that is a few inches deep.
Or, if you wish to detect a shallow puddle, it is possible to construct a water detector. Two wires, or copper strips on a circuit board, etc. Connect these to a sensitive transistor or other amplifying device.
If water bridges across the two contacts, it will conduct a small amount of electricity. The signal will be detected and amplified. You can use this to close a relay which operates your pump.
The pump will stay on until the contacts cannot pass a signal. You may not wish it to continue that long. Therefore you may need to add a timer, or other circuit, which will shut off the pump.
Over time the contacts may acquire dirt, film, etc. This can prevent proper operation. They'll need to be cleaned every so often.