A 32-year-old man who was caught in a police operation aimed at trapping paedophiles has been spared jail so that he can care for his father.
Southwark Crown Court heard that James Farina, of Hornchurch, east London, sent explicit suggestions to a person he believed was a 14-year-old girl.
But the girl was fictitious and Farina was arrested after arranging to meet.
Judge Geoffrey Rivlin gave him a three-year community sentence after hearing he cared for his sick father.
The judge told Farina: "The sentence must be seen in the main as a compassionate sentence which has regard to the fact that you are the principal carer for your sick father.
"I do not want the sentence I have imposed to discourage the police from continuing this work which is so important and valuable."
The court heard that Farina made contact with what he thought was a teenage girl called Emily, via a chatroom for children.
He sent a naked picture of himself to "Emily", engaged in sexual banter and eventually arranged to meet in Battersea Park, south London,.
Police swooped after he tried to flee the scene by car on 7 September.
Officers later found indecent images of children on his home computer.
He pleaded guilty to 10 charges, including grooming and possessing indecent pictures of a child.
Farina was also ordered to attend a sex offenders programme and was placed on the sex offenders register for five years.