You mention "a mechanical switch, such as the ball valve", but a switch and a valve are two different things. A valve is usually "open" or "closed" (rather than "on" or "off"), and Google Books seems to corroborate that:
It also gets more results for a switch being "open" or "closed", but searching the Google Books corpus for "the switch is open" suggests that the vast majority of those are for electrical circuits. I'd say that if you wanted to indicate the position of the switch itself, then you could say "on" or "off", but if you wanted to refer to the flow of a fluid, then "open" or "closed" might be a better choice. I recommend asking about a more specific situation if there's one in particular that you're interested in.