Klajdi Musta, 35, was tending to the medication within the properties on Coed Y Mind Highway in Llanbradach, close to Caerphilly.
The homes had been raided by police on Might 3, prosecutor Byron Broadstock advised Cardiff Crown Court docket.
The primary operation was at 69 Coed Y Mind Highway the place officers discovered 173 hashish vegetation whose yield had a possible road worth of £170,000.
MORE NEWS: Gang who flooded streets of South Wales with medication jailed for 50 years
The opposite smaller one was at 26 Coed Y Mind Highway.
Musta pleaded responsible to producing a category B drug.
His barrister Sol Hartley mentioned his shopper was in “a dire scenario”.
He advised the court docket how the Albanian nationwide had arrived within the UK after being deported for staying illegally in Greece.
Musta nonetheless has a spouse and two kids who’re dwelling in Greece.
Mr Hartley mentioned: “The defendant left Albania desirous to make a greater life for himself.
“The worst punishment he’ll endure is being deported residence the place he doesn’t have a future for himself.”
The decide, Recorder David Payne, advised Musta: “You got here to this nation illegally in a lorry after you had been deported from Greece and also you had been made to repay a debt to those that introduced you to the UK.
“I’m advised that your loved ones are nonetheless in Greece they usually have no idea that you’re in custody right here.
“You mentioned you had been right here for 2 months earlier than you had been arrested and that you just had been watering the vegetation and that you just had realized what to do by watching movies on the web.
“You wouldn’t inform the police who had given you the directions or who had put you within the properties.
“This was an operation able to producing vital quantities of hashish.”
Recorder Payne added that Musta had been “exploited”.
The defendant was jailed for 32 weeks.
The court docket ordered the forfeiture and destruction of the medication.