。
Because of the storm, we had no choice but to stay home.
Literal
Storm [because-of-に-ために] we [topic-は] unavoidably house [at-に] was-being.
やむなく ('unavoidably / having no choice') is a formal adverb that adds a reluctant tone — the speaker would have preferred otherwise. Combined with the plain past いた ('was/stayed'), the sentence frames staying at home as a simple fact softened by reluctance rather than an outright obligation. のために is the longer form of のため, marking the storm as the cause.