A cannabis farm was found a house after a woman was overheard arguing with her boyfriend to get rid of it.
Police were called to a domestic disturbance at Marley Street, Beeston, and found 36 cannabis plants growing in the attic.
Christopher Iveson was lying on the sofa when police forced the front door open on November 22 last year.
Heather Gilmore, prosecuting, told Leeds Crown Court the plants had a street value of £19,800.
The 23-year-old told police he was a heavy cannabis user and was growing the class B drug for himself to try to save money.
The electricity supply to the family home had also been bypassed.
The prosecutor said wires and fuses had been disconnected and could have killed anyone who touched them.
Iveson pleaded guilty to production of cannabis and extracting electricity.
He has previous convictions, including for drug dealing, robbery, burglary, battery, assaulting a police constable and dangerous driving.
The court heard Iveson, who is unemployed, is expecting his second child with his long-term girlfriend.
Abby Whelan, mitigating, said: "His partner refused to return to the house while the cannabis was there.
"She told him it was either her and the baby or the lifestyle he was starting to follow.
"He had made the decision to dispose of it but the police attended."
She added that Iveson is trying to wean himself off cannabis completely.
Iveson was jailed for 12 months.