Stanley Websdale, 37, was arrested on August 20, 2020, after police carried out a search of his home on Spen Lane, Leeds.
Prosecuting the case at Leeds Crown Court on Wednesday (Jan 26), Oliver Connor told the court Websdale had 22 previous convictions - including for similar offences.
"On the 20th of August 2020, a warrant was executed at the defendant's address in Leeds", Mr Connor said.
"A quantity of cannabis was found.
"There was also a large quantity of zip lock bags found."
Police seized a quantity of 43.27 grams of cannabis hidden in the kitchen of Websdale's home.
He was interviewed on the same day.
When questioned, Websdale told officers the cannabis was for personal use.
"He told police he was a heavy user, smoking 20 joints a day", Mr Connor said.
Websdale was charged with possession of a Class B drug, namely cannabis.
He pleaded guilty at a hearing on January 5, 2022.
In defence, Martin Morrow told the court Websdale was due to start a new job.
He said the offence had been "hanging over him" in the 17 months since he was arrested.
"It was during the pandemic", Mr Morrow said.
"He was not going out at all. He was heavily dependant (on the cannabis)."
Websdale had not committed any offending since the incident, Mr Morrow added.
"He has reduced his consumption" Mr Morrow concluded.
Websdale was sentenced to four months imprisonment, suspended for 18 months.
In sentencing, Judge Khokhar said this was his "last warning" and a custodial sentence would follow any further offending.
He told Websdale the offer of employment could bring about "some form of stability" to his life.
"Not having too much time might work towards you getting rid of that habit", the judge added.
"If you commit another offence you will come back before me. Is that understood? This is your last warning."
Websdale was also ordered to do 80 hours of unpaid work and complete 15 RAR days.
Support the YEP and become a subscriber today. Enjoy unlimited access to local news and the latest on Leeds United, With a digital subscription, you see fewer ads, enjoy faster load times, and get access to exclusive newsletters and content. Click here to subscribe.