If within a reasonable time after notice to the lessor of conditions requiring repair to make the premises fit for human habitation and to place the same in good and safe working order which the lessor ought to repair he neglects to do so, the lessee may repair the same himself and deduct the expense of such repairs from the rent, or otherwise recover it from the lessor; or the lessee may vacate the premises, in which case he shall be discharged from additional charges of rent or performance of other conditions.
If the cost of necessary repairs exceeds one month's rent, after written notice stating the specific reason for the withholding, the lessee may withhold payment of rent and immediately deposit it in a separate bank or savings and loan account, written evidence of such action to be provided to the lessor upon deposit, maintained only for the purpose of making repairs until such time as the lessor makes the repairs, at which time the lessee shall release the deposit to the lessor or until sufficient money is accumulated in the account for the lessee to cause the repairs to be made and paid for.
SDCL 43-32-9