Police found cannabis plants capable of producing £20,000 worth of the class B drug when they searched a house in West Yorkshire.
Leeds Crown Court heard officers found 76 plants hidden in four rooms of Clinton Bull’s home in Ossett, near Wakefield.
Carmel Pearson, prosecuting, said officers went to the property on January 31 this year after receiving a tip-off.
Miss Pearson said they looked through a window and could see cannabis plants inside. The prosecutor said the cellar and attic had been turned over to the production of cannabis and had been fitted with lighting and growing equipment. The electricity meter had also been bypassed.
Not all of the plants had reached maturity but those that had were capable of producing £20,000 worth of cannabis.
Bull, 30, of Woodbine Street, Ossett, pleaded guilty to producing cannabis and abstracting electricity.
Ian Cook, mitigating, said Bull began growing the plants has he had financial problems and had built up a drug debt as he had a “significant” cocaine habit. Mr Cook said Bull was now receiving help to tackle his drug habit.
He added: “He has instructed me not to persuade you to deal with him with anything other than immediate imprisonment.
“He views his best opportunity of moving forward is to spend a period where he is completely away from drugs.”
Bull was jailed for 18 months. Judge Mushtaq Khokhar said: “This is the first time you have been convicted of a drug offence and it is a serious one.
“This was production of cannabis and then, having harvested it, you would have sold it to others for gain. You have been honest enough with the court to say the reason for being concerned in this production was for financial gain.”