Police were first alerted to Lee Cook's set-up when they were called to his property in the wake of the attack on March 31 last year.
Prosecuting, Stephanie Hollis, told Sheffield Crown Court: "Officers were called to his address at Bentley Street after a report that males had entered the house.
"It appears the males were aware there were was a cannabis set-up at the property and wanted to deprive him of that.
"He had an injury to his head."
Defending, James Gould, told the court that Cook, now of Mawfa Crescent, Gleadless Valley, was in intensive care for several weeks following the attack.
He said it had also led to him suffering from side-effects including seizures and memory loss, which medics believe could be permanent.
Officers searching the property found two bags of cannabis under the stairs, weighing 25.7 grams, with a street value of £160.
Bits of soil and green leaves were found on the stairs, which were believed to be debris left by the group of thugs who attacked Cook when they broke into his property.
Evidence of a cannabis factory was found in one of the upstairs rooms that had a 'grow tent' as well as specialised lighting.
In total, police estimated Cook had grown 1.1kg of the class B drug on the premises.
Cook pleaded guilty to production of cannabis at an earlier hearing at Sheffield Crown Court.
In mitigation, Mr Gould, said Cook had fallen into the production of cannabis when his alcohol addiction led to his life unraveling.
He said: "He had a very well-paid job. He developed a drink problem, and couldn't hold down his job.
"The drinking became worse, and spiraled out of control."
Mr Gould added: "He got into debt as a result of drinking to excess and this was an attempt to address the issues."
Recorder Graeme Cook sentenced Cook to 16 months in prison, suspended for two years.
He said: "There's never any excuse for violence, but it must be said that by breaking the law yourself you invited this type of thuggery.
"It's never an excuse for violence, but I think you have learnt a very harsh lesson."
Cook was also ordered to complete a six-month alcohol treatment programme, as well as a 20-day rehabilitation activity requirement.