Here is a tip I got and use from a member on here.
Drill a small hole just below your normal water line on the intake tube in the tank ,then if the water level goes below that it will loose suction and stop draining.
Con when doing water changes you half to wait until the water is above the hole to turn pump back on .
Pro you will never drain your tank and flood your house.
This is a must do trick for me.