A sex offender threw a glass bottle at a paramedic who was only trying to help him, a court heard.
Harry Trayte was earlier this week jailed and banned from a village for two years over his nuisance offending.
He appeared at Kirklees Magistrates’ Court again and admitted assaulting the ambulance driver.
Prosecutor Andy Wills explained that the attack happened at Larch Avenue in Thongsbridge on September 2.
On that date paramedic Adrian Firth and his colleague were called to the home belonging to Trayte’s parents.
The 23-year-old was complaining about pains in his throat and the men spoke with him about his difficulties.
Mr Wills said: “Mr Firth noticed no difficulties with his breathing and advised the defendant that he should seek medical advice from his GP and that he didn’t need the ambulance.
“Trayte said: ‘Never mind’ and closed the door on them and Mr Firth returned to the ambulance.
“When he opened the door he heard a loud bang and the vehicle was struck by a glass bottle.
“Some of the glass caught him on his left hand and some went into the footwell of the vehicle.”
Mr Wills said that the victim heard somebody shouting and noticed Trayte hanging out of the window saying: “Sorry, I didn’t mean to do that.”
Mr Firth suffered a cut and some bleeding to his hand, magistrates were told.
Trayte also pleaded guilty to failing to comply with his notification requirements.
In September he was ordered to sign the sex offenders’ register for five years after exposing himself to a female member of staff at the Carphone Warehouse in Dewsbury.
Because Trayte has no fixed address he is required to register his details with police on a weekly basis.
He failed to do this on September 23 and was arrested.
Magistrates were told that Trayte, who has mental health issues, has 12 offences on his record.
This week District Judge Michael Fanning jailed him for 16 weeks and made him subject to a two-year Criminal Behaviour Order.
He heard that Trayte had repeatedly harassed a former neighbour, leaving his underwear on her doorstep and demanding to use her children’s trampoline.
The CBO included a ban on him entering several streets in Thongsbridge and going to Huddersfield Royal Infirmary except in an emergency.
Mike Sisson-Pell, mitigating, said: “Of course an ambulance driver is somebody who deserves the protection of the law but, perhaps in the circumstances, this is not as serious as it may have been.
“When Mr Trayte threw the bottle at the ambulance he didn’t intend the driver to get hurt.”
Magistrates sentenced Trayte to one week in custody but this will run concurrent to his existing sentence and no make no difference to the to the length of it.
He will still have to pay £115 victim surcharge upon his release from prison.