A landlady discovered £13,000 of cannabis growing in two rooms of a house she rented to a tenant when she went to inspect the property.
A court heard how 45 plants were found growing in bedrooms of the house along with a hi-tech heating and growing system.
The electricity to the property of Swithens Street, Rothwell, had also been bypassed.
Leeds Crown Court heard the woman had first rented the house to Ryan Letizia in October 2012.
She made the discovery when she went to check on the property on May 29 last year.
Letizia, 26, was not in at the time but returned home after police had been called to the property.
He spotted a police officer stood at the back door and shouted into his mobile phone: “I’ve been nicked.”
Electronic weighing scales were found in the kitchen along with two pieces of paper.
One contained a list of growing components along with prices.
The others contained a list of names and telephone numbers.
Experts who examined the plants estimated that they were capable of producing £13,500.
The growing set up was such that around £40,000 worth of the Class B drug could be produced in the property each year.
Letizia, now of Spen Lane, Leeds, pleaded guilty to producing cannabis.
He has a previous conviction for supplying cannabis.
He was jailed for three years and two months.
Natalie Banks, mitigating, said her client became involved in the offence as he was a regular user of the drug.
Judge James Spencer, QC, said: “You have been in trouble before for supplying cannabis.
“You are now in court again for producing a quantity of it.”