The water in your dishwasher causes the float to lift when it reaches a certain level, and that's when the float switch goes off. The float switch shuts off the flow of water into the dishwasher. The float in the dishwasher needs to be able to move.
Let's Get It Fixed!
HomeX virtual experts will assess your issue (for free!) and can resolve simple problems.