A man threatened to shoot a furniture repair worker after the technician rang his doorbell by mistake.
Robert Shea pointed the weapon at Patrick Duffy as he stood on the doorstep, magistrates were told.
He was terrified to be greeted by Shea, who pointed a rifle out of his window and threatened him.
His solicitor told Kirklees magistrates that the 55-year-old was sick of strangers cutting through his property.
Shea was found guilty after a trial of threatening behaviour.
Prosecutor Andy Wills said that the incident happened on December 10.
Mr Duffy was working in his role as a furniture technician for Home Serve.
Mr Wills explained that he was employed by the service to visit homes to repair furniture.
He said: “He had to go to an address in Penistone Road and contacted the person at that address who told him he was in.
“He entered this into his sat nav device and followed the directions.
“Unbeknown to Mr Duffy that took him to an address in Kirkburton and not the correct address in Waterloo.”
As he pressed the doorbell to the house he saw a long-barrelled gun pointed towards him from an open upstairs window.
The person inside was Shea who swore at Mr Duffy, Mr Wills said.
He added: “Mr Duffy, not sure what was taking place, looked up to this person pointing the gun out and threatening to shoot him if he didn’t get off the property.”
Mr Duffy backed away with his hands up, shouting ‘Whoa’ at Shea and keeping his face covered.
He got back in his car and called police who found the gun propped up inside a bedroom as well as a knife on the side table as they entered the house.
Shea didn’t accept that his behaviour towards Mr Duffy was wrong, claiming that he had the rifle with him at all times and would have shot him.
Mohammed Arif, mitigating, said that his client has had regular unwanted visitors since moving into the address.
He told magistrates: “They have attended when they should have gone down the road.
“He feels harassed by people cutting through his property - it was in the heat of the moment (and) he lost the plot.”
Magistrates sentenced Shea to 12 weeks in custody suspended for a year.
He was ordered to pay £250 compensation to Mr Duffy due to the distress he caused him and his weapons will be destroyed.