I'd prefer to have the battery outside the house, with a concrete wall between it and the house. Or just have it 10 feet away, like where you'd put a generator.
Mine's in my garage, which is breezeblock construction, and the garage doors are insulated, so it keeps it away from temperature extremes - which will cause issues with an outside battery dependending on local climate minimas and maximas.
The SolarEdge battery has a built in fire suppression system that triggers if thermal runaway is detected, which should be enough time to evacuate (in the UK it's also mandatory to have a smoke alarm fitted in your solar "plant room").
At the time Powerwall2 were the best value/capacity by a country mile, but I didn't trust Musk to not burn my house down.
So its outside, with a very large planting trough above it to provide some level of weather shield, and a strategic supply of sharp sand if the powerwall goes full Musk.
I'm sure that's an option for large, (semi-)detached houses. But it's not an option for the small homes or apartments that the vast majority of people live in.
That's where grid-scale energy storage comes in then. Or at least a less volatile battery chemistry. Not every solution has to be individual unit sized
A genny has a 12V car/lorry battery to start it. My work one is basically a lorry diesel motor on a floor bolted chassis. It is the other side of an external wall (double skin of brick). Ironically enough the genny is inside the same room as the hot water boiler which is gas powered. The original heating was a coal fired boiler which was converted to a weird oil squirting "hair dryer". That's all gone now.
The fire risks that I worry about do not really include the genny. The fridge in the kitchen is potentially far worse. I have, of course, put in a fire detection and suppression system inside the computer room.
At home I actually have a more involved fire risk assessment than at work. My wife does dog boarding at home and one day I will stop her leaving a cloth to dry on the cooker ... sigh. Anyway, making sure that humans and dogs get warned and get out safely is quite involved.
As we all know there are three ingredients required for fire: a source of ignition, a combustible material and finally: oxygen. Remove one and fire does not happen. Unfortunately some reactions will generate copious amounts of heat and oxygen, ie all three requirements for combustion and become self sustaining. Lithium batteries for example can do this. It's a bit of a nightmare but techniques are being developed to deal with "self igniting metals" and the like.
Diesel fuel is particularly hard to ignite which makes it not too much of a worry in a fire. By the time the fuel tank is on fire the fire department has given up on your building and are just trying to stop the spread to other buildings.
A problem with keeping lithium batteries outside is that it gets way, way too cold in many parts of the world for them to survive charge cycling.
I mean: Sure, there's ways to improve that. There's even climate-controlled outdoor racks, and rack-mount batteries from vendors like EG4 to slot into them.
But a common goal of home battery arrays is to improve the energy efficiency of that home. Heating (or, I suppose in extreme cases, perhaps even cooling) a battery box runs counter to that goal.