Float switch level measurement