A court heard six shots were fired at the property during a feud between two rival drug dealers.
Liam Gardiner is thought to have fired the shots from a revolver or semi automatic pistol after recruiting his brother and two other men as “hired muscle”.
A jury at Leeds Crown Court heard Liam Gardiner was a drug dealer in the Knottingley area and planned the shooting as part of a turf war with a rival dealer.
Gardiner decided to take action after two of his street dealers were beaten up and had cash and drugs taken from them.
Gardiner was then in contact with his rival and was challenged to a fight.
Judge Rodney Jameson, QC, told Gardiner: “You declined because you are not a fighting man.
“You decided that this particular disadvantage could be more than evened up by obtaining a gun so you could assert your position in the hierarchy of drug dealing in the Knottingley area.”
A trial heard Gardiner recruited brother Michael, Cameron Rumney and Martin Evans.
They spent more than four hours driving around trying to find the man on the evening of July 20 last year before locating him at a house on School Close, Sharlston Common, Wakefield.
Liam Gardiner is thought to have fired the shots.
Five bullets went into the living room and one went into a bedroom.
The man was in the living room at the time but was not struck by any of the bullets.
All four defendants were found guilty of possession of a firearm with intent to endanger life.
Liam Gardiner, 32, of The Ridgeway, Knottingley, was jailed for 15 and a half years.
Michael Gardiner, 30, of Windermere Drive, Knottingley, Rumney, 27, of Broomhill Close, Knottingley, and Evans, 30, of Cleveland Avenue, Knottingley, were each jailed for 13 years.
Judge Jameson added: “Each of you knew what was likely to happen. Each of you were involved for a long time.
“It was essentially a revenge attack on a rival drug dealer.”
After the case, Chief Superintendent Mabs Hussain, District Commander of Wakefield Police, said: “Fortunately firearms crime is very rare in Wakefield and it must be stressed that the use of weapons in the district or anywhere in West Yorkshire will absolutely not be tolerated.
“Those who think it is acceptable to carry such weapons, never mind use them, should expect to face significant custodial sentences.
“I would ask anyone who has knowledge of the criminal use or possession of firearms in West Yorkshire to contact the independent Crimestoppers charity anonymously on 0800 555 111.”