A Sheffield dealer and his drug operation was cut short after a letting agent stumbled across the haul during an inspection.
Imran Khan, of Carrfield Road, Meersbrook, avoided jail after running the cannabis operation from a room in a rented house on January 16, 2016.
Officers seized £6,270 worth of cannabis and drug paraphernalia from the property in Gleadless Road, Heeley and a mobile phone from Khan's parent's address which had messages from buyers.
He was caught by police just hours after the letting agent alerted police to the findings. Kamran Ali, Khan's brother, was also charged with drug offences on the basis he gave the co-defendant a lift knowing drugs were inside the vehicle.
Sheffield Crown Court heard the letting agent entered a property on Gleadless Road, Heeley for a routine inspection.
David Wain, prosecuting said: "The agent could smell cannabis and entered one of the bedrooms where they found the drug set up.
"The police were contacted and as the agent left the property, the two defendants were seen leaving in Ali's silver Audi.
"Police searched the property and found 594 grams of cannabis, the majority of which was discovered in two bins."
Mr Wain added Mr Ali's fingerprints were found on some of the bags of drugs but the prosecution said he was not part of the commercial enterprise.
The court heard police spotted the Audi with the two defendants inside and found an ice cream tub with 28.6 grams of cannabis in small deal bags in an Adidas bag under Khan's seat along with 0.25 grams of cocaine on him which the prosecution accepted was for personal use.
Defending Khan, Robert Sandford said the defendant was a a drug addict turned dealer who used it as a way to pay off debts to his supplier.
"He is now addiction free. He has reconciled with his family since his offending and has been in full-time employment since September 2016."
Sentencing the pair, Mr Recorder David Gordon said: "Drugs are a serious problem on the streets all over the country causing huge misery. These courts see it day in day out.
"But I do not see why you should be a burden on the public purse when you can be punished quite adequately in the community.
Khan pleaded guilty to possession of a class B drug with intent to supply at an earlier hearing. Khan was handed a 15 month sentence, suspended for two years and must undertake 150 hours of unpaid work.
Ali, pleaded guilty to the same charge on the day of sentencing on the basis he gave Khan a lift in his car knowing there was drugs inside the vehicle.
He was handed a 12-month community order and was told he must undertake 40 hours of unpaid work.