Float-actuated switch