In the science fiction short story "There Will Come Soft Rains" by Ray Bradbury, the house is not only the main character in the story, but the only character. Four humans are briefly mentioned, but only as spots that appeared upon a wall after they were instantly incinerated in the heat of nuclear devastation.
The best way to approach this question is to anthropomorphize the house, or to present the house as if it were a human character and had a story arc like a standard character. Then you can go through the story and explain how the house performs its functions faithfully as a servant would and how it reacts to external events that pressure it and eventually kill it.
For instance, the story starts with the house performing its daily duties. It gives a wake-up call, makes breakfast, cleans up after breakfast, announces the time in relation to daily schedules, cleans its rooms, and so on. The house anticipates the needs of its residents just as a diligent butler or maid might see to the needs of their employers.
When the scene shifts outdoors, we learn from the images on the charred wall that a couple and two children lived in this house. From this, we derive the house's backstory. We understand that right up until the nuclear explosion, the house must have been performing its duties constantly and faithfully, caring for its human occupants. Although the house is not human, this causes us to feel sympathy for it, just as we would have sympathy for a human character that performs their tasks faithfully and well.
Because we come to appreciate the house's steadfast performance even in the wake of the disaster, we see it as a tragedy when the house is destroyed in the fire. Notice how Bradbury describes the effects of the fire as if the house were a human body. As the fire overwhelms the house, he writes:
The house shuddered, oak bone on bone, its bared skeleton cringing from the heat, its wire, its nerves revealed as if a surgeon had torn the skin off to let the red veins and capillaries quiver in the scalded air.
It almost makes us wonder if the house can experience pain. We feel a sense of tragedy, because the house has become as vivid as a real character for us in the faithful execution of its duties and then in its sudden demise.