The energy company had concerns about the property at Gray Road in Hendon, Sunderland, so sent a contracted worker, with a warrant and a locksmith, to carry out a check on May 24.
Prosecutor Jane Foley told Newcastle Crown Court: "Once inside the property it was clear it was being used as a cannabis farm."
Miss Foley said the workers contacted the police when they saw what was inside the house.
Families ordered to remove 'unauthorised' tributes from loved ones' graves in Sunderland cemeteries
See 11 fantastic pictures from the Seaham Food Festival as thousands of foodies head to the coast
Bus chief denies ‘slice and dice’ of North East travel routes following cuts
Family of Archie Battersbee vow to call for ‘change’ after his death
15 pictures showing exactly why beautiful Washington Village is in the running for Britain in Bloom awards
The court heard four rooms were "dedicated to the production of cannabis", with three being used for growing the plants, one being used for drying them and the loft in the process of being converted for use.
The property was kitted out with heat lamps, cooling fans, extensive cabling, timers, oxygen cylinders, air ducts and the electricity meter had been bypassed.
A total of 246 plants, at various stages of growth, were inside the house.
Miss Foley told the court: "It was capable of producing significant amounts of cannabis for commercial use."
Albanian national Rexhino Musaku, 25, of no fixed address, who was in the UK illegally, was at the house when police arrived and confessed "I'm involved".
Musaku told officers he arrived in the UK three years ago and had done some work as a mechanic, which stopped because of the pandemic.
He then met two men who offered him £1,000 to look after the plants.
Musaku said instead of cash he would be given grooming products or "provided with trips to Scotland and London" in return for his work at the farm, where helived for around five months.
He pleaded guilty to producing cannabis.
Judge Sarah Mallett sentenced him to 20 months behind bars.
The judge said: "There were four room set up to grow cannabis, with cannabis plants in three and being dried in the fourth. It appeared the operation was going to be expanded into the loft.
"There were 246 plants in a professional set up."
The judge said she accepted Musaku was remorseful and had become involved to support himself and his mother.
The court heard Musaku has no previous convictions.