A DRUG dealer who was not allowed to attend his own trial because he kept falling asleep has been jailed for three years.

James Smedley claimed he suffered from a sleep disorder and continually nodded off during more than 40 appearances in the dock at Edinburgh Sheriff Court over the past four years.

Smedley, 46, has been sent for numerous psychological and psychiatric tests by the court but was deemed fit to stand trial, despite his claims of struggling to stay awake.

Last month, Smedley was told by a sheriff that his trial involving drug supply charges would be held in front of a jury - but without him.

Following the four-day trial, he was found guilty of producing and supplying a large crop of cannabis from two properties in Haddington on May 26, 2015.

Smedley returned to the dock for sentencing at Edinburgh Sheriff Court today (Thursday), where he was jailed for a total of 36 months.

Smedley, of the town’s Seggarsdean Terrace, appeared from custody after he missed his sentencing date after travelling to Ireland to attend a funeral.

Sheriff Kenneth Maciver told Smedley he had “taken advantage of the courts” and had carried out a “ridiculous charade” in a bid to fool the court system.

Sheriff Maciver added: “You have been using your sleep deprivation issue to avoid the consequences of your cannabis growing.

“In my view, this has given you confidence that if you continued to pretend to not stay awake and could not speak then this whole matter may go away.”

Then sheriff stated that the “extraordinary case” had called in court 43 times since Smedley’s initial arrest and he has been sent for three psychiatric assessments.

The sheriff added: “You were fully involved and you were found in the house when the police arrived.”

Smedley was caught with about 660 plants which were being grown at an address in Haddington, with the street value stated to be up to £90,000.

Police arrived at the Lennox Road property following an anonymous tip-off to find Smedley the sole occupier and every room in the house packed with plants as part of the “organised plantation”.

It is believed that others were involved in the cultivation but, with Smedley failing to engage with the process, they have never been caught.

The case against Smedley has called in court more than 40 times over the past four years due to him continually napping in the dock and not communicating with his solicitor.

He was regularly accompanied by a family friend who had to help him in and out of the dock during the numerous visits to the court.

Court-appointed solicitors have worked on the case over the years before being forced to retire from acting due to Smedley not engaging with them or with the court process.

Smedley was found guilty by a jury of producing and supplying cannabis from two addresses in Haddington on May 26, 2015.

He was also found guilty of failing to appear at two court hearings.