Long wires and float switch problem

Sounds like the EMI coming down the wire is common-mode (big pulses induced off the mains).

Some software debouncing is in order, just like for any button input.