Does the float include a switch - or is the "output" variable from some much lower value up to infinity? If the output is variable and within a useful range you might plan to flow a trickle of current thru it and use a comparator to toggle when the voltage drop is at an appropriate point.
The float is circular and fits around a hollow shaft that has a mini circuit board. The mini circuit board acts like an all or nothing switch, giving no impeadance until it reaches the top then it reads infinite.
The next question would be - do you want the solenoid valve just off or just on as the float crosses a certain point? A "feature" that you could add, if the float revealed various positions, is the ability to pulse the solenoid valve on for short period as a way to moderate the flow of water. The "short period" I have in mind is many seconds, a minute or so - but the application and flow rates may not allow for this approach.