It too often takes a tragedy to prompt action on homelessness.

One such event took place last week. What will come of it remains to be seen. On Wednesday, two toddlers, aged 1 and 2, were burned to death in Hunts Point, according to authorities, when a radiator valve popped off and engulfed the room where they were napping in steam.

In a sober news conference after viewing the apartment, Mayor Bill de Blasio called the situation “an unprecedented accident.”

It may have been, but the toddlers’ placement in a building (though not an apartment) with multiple open code violations was due to city policies and resources stretched to the limits. They and their parents were homeless. Originally from Maine, they hoped to start a new life in the city, but encountered various difficulties along the way.

One of the beauties of New York City is that it was there for them. Like all New Yorkers, they had a right to shelter, guaranteed by the state constitution. But what kind of shelter is it?

Where do New York City’s over 60,000 sheltered homeless reside?

Most homeless individuals and families served by the city’s system are in traditional shelters — temporary housing specifically built or adapted to shelter the homeless.

Those shelters are home to over 42,000 people, as of November 30. But the shelters aren’t all large, dormitory-like facilities housing single adults. Over 70 percent house families with or without children. Family shelters can offer private cooking facilities and bathrooms, child care and job training, “with the goal of getting people back on their feet,” says Shelly Nortz, deputy executive director for policy at the Coalition for the Homeless.

The toddlers in the Bronx, however, were not living in such a facility. They were in a unit in a privately owned building rented by the city for homeless families, in an arrangement known as “cluster” housing, which currently provide shelter for 11,000 individuals.

The private setting and step towards normalcy, however, often comes with serious downsides. The units have “minimal onsite services,” says Nortz.

A 2015 Department of Investigation report found many of the sites rife with violations. Some of them are operated by individuals on the Public Advocate’s Worst Landlord lists.

The average stay in the shelter system is over a year, and the number of these seeking shelter continues to climb. To close the gap, the city rents hotel rooms often at great expense: currently, just under 7,300 individuals.

Some of the hotels used today are more livable than the shelters, but others are infested by roaches and bedbugs, says Nortz. Lack of security has been blamed in part for events such as the 2016 fatal stabbing of a woman and her daughters in a Staten Island Ramada where they and dozens of others were being sheltered.

None of these numbers include the city’s street homeless population, the approximately 3,000 individuals who are often turned off by the dangers and decrepit nature of shelters, or are suffering from mental illness or substance abuse. (The numbers also don’t include various other categories of the homeless, such as those living in so-called “Safe Haven” units which can be waystations to permanent housing).

What else can the city do to fight homelessness?

De Blasio committed in January to ending the use of cluster sites by the end of 2018. Some have closed, but thousands still reside at such sites.

The city is also expanding the practice of using hotels to meet demand.

A number of high-profile incidents in traditional shelters led to outcry from de Blasio and others to pay more attention to conditions and lack of repairs. Efforts are ongoing, but street homeless individuals routinely cite bad shelter conditions as a reason for staying on the street.

The long-term solution is to build permanent, affordable housing, which would stave off homelessness by offering stability to New Yorkers living paycheck to paycheck.

The other, obvious solution is building more shelters, instead of relying on hotels or decrepit private apartments.

Yet efforts to do just that have met opposition from communities around the city who rebelled against the idea of new shelters in their neighborhoods. That’s a position that just doesn’t hold up to numerical or moral scrutiny. When more units are needed, and temporary ones are insufficient or even dangerous, as for the toddlers in the Bronx, the challenge has to be met citywide.