Robert Dunstan, of Chelet, Dromleigh, Bantry, Co Cork, is presently in involuntary psychiatric care.
However, he was found mentally fit to plead in the case against him at Cork Circuit Criminal Court.
He pleaded guilty to a charge of intentionally causing damage to a vehicle in order to endanger life at Seafield, Bantry, on June 28.
Sgt Emmet Daly said the couple living there had a baby that was only five days old when Dunstan set fire to the van.
The fire damage caused the handbrake to fail and the burning van rolled towards the footpath outside the family home.
The young family presented a victim impact report to the sentencing judge but did not want it read out in court.
Judge Seán Ó Donnabháin said the family were afraid there would be a recurrence and they hoped that Dunstan would not return to Bantry. Sgt Daly said the accused had no family connection with Bantry.
Judge Ó Donnabháin imposed a seven-year sentence, suspended on condition that he would remain in involuntary care until a consultant psychiatrist deemed him fit to be released.
So far, his psychiatric condition is proving unresponsive to treatment, said Donal O’Sullivan, defending.
Sgt Daly said the fire was started at 5am on the day in question. In a follow-up search at Dunstan’s home, gardaí found five cans of WD40 oil wrapped in kitchen towels.
Mr O’Sullivan said: “He also believed there was a man in his attic with a machine causing him pain.”
Judge Ó Donnabháin said that the case was a serious concern.