I want to cut the return pump if water level drops beyond a point of water level.
I know that I can use a floater for this but I have a opto level sensor spare.

So, can opto level sensor be always underwater and when water level drops and opto level is on the air to cut the pump?

I mean if it is ok for the sensor ro be placed continiously underwater in salt water aquarium.

Many Thanks.