A man was sentenced at Preston Crown Court for the attempted murder of a man in his own home with a bow and arrow.