Yes, putting the valve in the cockpit could present a problem if you don't have a self-bailing cockpit. If you do, it should drain anyway. It's your job to see to that. But any valve which requires electrical power to close is going to fail if the electrical power fails (dead battery, shore power out, whatever). So I think a spring-loaded or pressure-actuated valve would be best.
Having the valve at the power post would be best as long as you're willing to put up with disconnecting the cable every time you leave the dock (which is why a wireless link would be nice). I think I'd still put the valve on board, in a location where a failure before the valve won't flood the boat. If you're not worried about appearances you could have the valve on deck right at the fill.
Another idea would be to tape the cable to the water hose with disconnects at each end... So when you disconnect the hose the cable is right there and you disconnect it as well. When you stow the hose the cable goes with it. Then all you'd really need on the boat is the float switch; everything else can be at the power/water supply. That would probably be easiest to install, too.
Having the valve at the power post would be best as long as you're willing to put up with disconnecting the cable every time you leave the dock (which is why a wireless link would be nice). I think I'd still put the valve on board, in a location where a failure before the valve won't flood the boat. If you're not worried about appearances you could have the valve on deck right at the fill.
Another idea would be to tape the cable to the water hose with disconnects at each end... So when you disconnect the hose the cable is right there and you disconnect it as well. When you stow the hose the cable goes with it. Then all you'd really need on the boat is the float switch; everything else can be at the power/water supply. That would probably be easiest to install, too.