Switches operated by change of liquid level or of liquid density