A mechanical engineer was caught with a "sophisticated" cannabis farm in his attic by an electrician.

Liam Esler, 37, was snared with a total of up to £7,100 of the drug at the flat in Whiteinch on January 20, 2022.

The city's sheriff court heard that the local housing association carried out electrical work in the area.

Prosecutor Mark Allan said: "The electrician gained access to the loft space above Esler's flat.

"This was where they identified a cannabis cultivation.

"The growth area was well established - it was a professionally installed cultivation with fans.

"What that leads to is a reasonably sophisticated cultivation."

A total of 16 plants were recovered, valued between £3200 and £3600.

A further 360 grams of cannabis was discovered from the kitchen valued between £2000 and £3500.

First offender Esler pleaded guilty to producing cannabis.

John Kilcoyne, defending, told the court: "He is a mechanical engineer, his wife is a nurse and they have two children.

"He said he has used cannabis for a significant period of time as he had cancer in 2012 and recovered in 2015.

"He used cannabis oil and he said that cannabis helps with his sleep and anxiety.

"He said during Covid, it was difficult to get cannabis and he got the equipment online - the cultivation was for personal use."

Esler, now of Partick, was ordered to do 150 hours of unpaid work and put under supervision for 12 months by Sheriff Paul Reid.