A very quick way to do this would be to have your float as leak detection and the set the socket to water # (the number that you float is on).

PS I have not tested it, let me know.....