The incident happened around 6.20 a.m. on Tuesday September 20 at an address in Ratho Station.
Occupants within the property contacted police after shots were fired at the house.
No one was injured and this is believed to have been an isolated incident.
Inquiries are ongoing to trace those responsible and police are keen to trace two men wearing dark clothing, who were seen in the area at the time of the discharge.
A silver Saab estate car was seen in the Ratho Station area and was subsequently found abandoned in remote area off the A71 near to the turn-off for Kirknewton and East Calder.
Anyone with information that can assist officers with their investigation is asked to come forward.
Detective Inspector Alan O’Brien said: “Fortunately no one within the property or in the surrounding area was hurt as a result of this reckless and very dangerous act.
“We are treating this matter with the utmost seriousness and believe that this was a targeted attack. We are keen to hear from anyone who has information that is relevant to this inquiry.
“In particular, we want to hear from anyone who saw the two males in dark clothing, within the Ratho Station area. We are also keen to hear from anyone who saw a silver Saab estate vehicle in the Ratho Station area and In addition, any residents within East Calder who believe they saw the men making off from the abandoned Saab should also get in touch.”
Chief Inspector Jimmy Jones, Local Area Commander for North West Edinburgh said: “Any incident involving a firearm is extremely concerning for the local community, but thankfully they remain a rarity within the city.
“As part of our ongoing investigation we will have a high-visibility presence within Ratho Station for the time being to speak with members of the public, gather evidence and offer reassurance to local residents and businesses.
“Anyone with information can speak with our officers on patrol, contact 101 or make an anonymous report to the charity Crimestoppers on 0800 555 111.