Labour leader Andrew Little's Healthy Homes Guarantee Bill is on its way to becoming law, but it won't get there before the election.
The Bill, which the Government opposes, requires minimum standards to be set for heating, insulation, ventilation and drainage in rental homes.
It passed its second reading by 60 votes to 59 on Wednesday night and has two more stages to go - committee and third reading.
There's only one more member's day before Parliament is dissolved on August 22 and bills can't go through more than one stage in a day. Its fate will rest with the next Parliament.
"This Bill will change lives and save lives," Mr Little said when he opened the second reading debate. "No New Zealander should have to live in a house that makes them and their children sick."
Mr Little said 42,000 people were turning up at hospitals every year suffering from preventable respiratory conditions.
"That's appalling and this Parliament shouldn't accept it."
Building and Construction Minister Nick Smith said nearly all the requirements in the Bill were already in law and it was nothing more than "spin and waffle".
"During the last Labour Government's nine years in office 35,000 homes were insulated," he said.
"This National government has insulated more than 300,000 and there will be another 180,000 by July 2019."
Labour, the Greens, NZ First, the Maori Party and United Future supported the Bill. National and ACT opposed it.