Leeds Crown Court heard intelligence had been received suggesting that David Foster's address in Middleton was being used for drug dealing, leading officers to carry out a raid on July 10, 2020.
Prosecutor Ayman Khokhar said the 31-year-old pointed officers towards a cupboard in one of the bedrooms where they found a JD Sports bag containing a black tin with two packages of powder inside it.
The packages - each weighing around 7.5g - were found to be cocaine of 93 per cent purity. Their total estimated street value was between £1,200 and £1,500.
A second metal tin contained quantities of two very common cutting agents.
Searches also uncovered small grip seal bags, three of which contained 4g each of cocaine of 32 per cent purity.
Mr Khohkar said it suggested the Class A drug was being cut before sale.
Officers discovered five mobile phones in the property as well as another in Foster's car, while a total of £1,435 in cash was found.
On the day after Foster's arrest, a message from someone apparently looking to buy drugs was received on the mobile phone that had been in the car outside the home in Helston Walk.
Foster gave no comment during a police interview but later admitted possessing cocaine and possessing cocaine with intent to supply. He has seven previous convictions for 13 offences, with the most recent in 2015.
The court heard that he had a longstanding cocaine addiction but had been working to address this since his arrest and now used the drug on rare occasions only.
Paul Addison, mitigating, said Foster was eager to start work to earn some money and had already had to turn down one role due to the uncertainty about the sentence he might receive.
The judge, Mr Recorder Andrew Smith, noted that Foster had already been the subject of a qualified curfew for a year and nine months since his arrest.
He sentenced him to a two-year jail term, suspended for 12 months, with 150 hours of unpaid work.