Deividas Germanas, aged 20, of Medlock Crescent, Spalding, Lincolnshire, was arrested by police on August 4 after a neighbour thought the house had been burgled.
But when officers entered the property on Stavely Street New Edlington, Doncaster, they found Deividas with 40 cannabis plants worth £18,000
Germanas was the only resident and had ‘sophisticated equipment’ to produce cannabis, Andrew Bailey, prosecuting, told Sheffield Crown Court.
Mr Bailey added: “Officers calculated that Germanas had an annual yield, potentially, of around £54,000 a year.”
Sheffield weather: Met Office issues thunderstorm warning as heatwave set to end with heavy rain and lightning
Lakeside Doncaster: Major search launched by emergency services after man gets into difficulty in water
Rivelin Valley Road Sheffield: Body found after police search of Rivelin Valley
Popple Street Sheffield: 'Several' people arrested as street is cordoned off by police
Hosepipe ban: Reservoir near Sheffield less than 15 per cent full as photos show how water levels have plunged
Deividas, a Lithuanian national, was told by Judge Peter Kelson QC he would be deported if he had the power to do so.
The court heard how Germanas moved to the UK in 2012 when he was 17.
Germanas pleaded guilty at a earlier hearing on November 17.
Richard James Dawles, defending, said: “He has only just come to realise the enormity of the situation.
“He was hoping to settle down with his young family but was caught up in this instead. He is remorseful.
“There was an element of naïvety in what he was doing and he has been extremely stupid.”
Judge Kelson QC said: “If I had the power to do so then I would deport you, no question. But I do not have these powers and you will spend a jail term on these shores.
“You could have a grown a cash crop of £54,000 a year in the house. The courts in this country will not tolerate it.
“This was part of a significant drugs operation and you will receive a sentence to fit.”