Embattled former TV presenter Andrew O'Keefe has been whisked away from jail on a "sincere endeavour" to stay off drugs after a magistrate warned he was running out of chances.
The 51-year-old was released from custody on Friday after pleading guilty to contravening a court order.
He left Silverwater jail in Sydney's west in a tinted grey Mercedes-Benz later in the afternoon.
The former Deal or No Deal host was arrested in the city's exclusive eastern suburbs earlier this month, when he admitted to police that he knew he was not supposed to be at the Point Piper property.
Police attended about 9.30pm on Saturday and noticed O'Keefe's car parked outside, but they could not raise anyone inside.
Officers then went to O'Keefe's Vaucluse home just after 10pm, but he was not there.
His car was still parked at Point Piper when police returned around 11.45pm and O'Keefe came to the front door of a unit.
O'Keefe's lawyer Sharon Ramsden told Downing Centre Local Court he had technically breached the order, but he attended with permission to collect belongings.
But magistrate Greg Grogin disagreed it was only a technical breach.
The breach was not serious, he said, but it was aggravated by the fact he was already on conditional liberty for charges relating to the person in need of protection.
O'Keefe is due to return to court in November for that case.
"He breached his bail and the order being in a place he wasn't supposed to be," Mr Grogin said.
Ms Ramsden said there were no violence or threats involved in the breach and the people in need of protection were not present.
Mr Grogin granted O'Keefe a 12-month conditional release order with no conviction recorded.
He will be required to abstain from any drugs not prescribed by his psychiatrist and psychologist, who will need to continue treating him.
"I don't try to set people up to fail," Mr Grogin said, asking the ex-TV star if he would be able to comply.
O'Keefe replied: "I can guarantee that will be my sincere endeavour, yes."
He has previously disclosed drug-dependency issues and undergone treatment for mental health disorders.
A letter to the court from O'Keefe's psychiatrist provided a "well-based" diagnosis of bipolar and post traumatic stress disorder, Mr Grogin said.
"He appears to be doing that which is required ... to try and ensure he will live a stable life in the future," he said.
Ms Ramsden said there was no evidence the offence was a result of drugs, alcohol or mental health issues and nothing to suggest her client's treatment had not been working.
O'Keefe has not been convicted of any offence and has spent four-and-a-half months in custody on other charges, some of which were withdrawn, she said.
Mr Grogin told O'Keefe he could expect good and bad days as he tried to recover, but he needed to comply with court orders.
"The leniency that has been shown to you will not be extended forever," he said.
"I understand Your Honour, thank you," O'Keefe said, appearing on-screen from custody.
Before his arrest last weekend, O'Keefe had been granted bail by the Supreme Court, where his father Barry was formerly a judge.
O'Keefe also worked as a lawyer before taking up a series of TV hosting roles on various game shows and on Seven's Sunrise program.
One of his brothers attended the hearing, however he made no comment as he left the court.
Lifeline 13 11 14
beyondblue 1300 22 4636
1800 RESPECT (1800 737 732)