You could have a legal defense and prevail, if the proper steps were followed.
You have the right to deduct the cost of necessary repairs from future rents if the landlord fails to make repairs. To protect your rights under the implied warranty law, you must complete the following steps:
Step 1 - Tell the Landlord About the Problem. Tell your landlord, in writing, what the problem is and what you plan to do about it. For example, tell your landlord that you will withhold your rent if he/she does not make the requested repairs. Send a letter by certified mail. Keep a copy of the letter to prove that the landlord was notified. A sample letter is provided in this brochure.
Step 2 - Allow Your Landlord Time to Repair. The law gives your landlord a reasonable amount of time to make the repairs. The amount of time depends on the seriousness of the defect. If it is an emergency, the landlord is required to act quickly. For example, if you are without heat in the winter, it is reasonable to expect the landlord to provide heat within 24 hours. In the case of a non-emergency the landlord would have more time. For example, the landlord may have 30 days in which to repair a furnace during the summer months.
Step 3 - Show That the Landlord Did Not Make Repairs. It is important to give the landlord notice and to have evidence that the landlord did not make repairs. A copy of the letter sent to the landlord can be used as evidence; so can pictures, witnesses, or the report of a housing code inspector.
Step 4 - Repair and Deduct. If the landlord does not make the repairs, you can repair and deduct. You should not repair and deduct for repairs that exceed the monthly rent. If the rent is $300.00 per month, then the amount deducted for the repair should not exceed $300.00. Seek legal help if the repair is costly.
The amount paid for the repair must be reasonable. If you are sued in court by the landlord for nonpayment of rent, you may have to pay the landlord the amount that the court found unreasonable. The court will not hold a landlord responsible for a repair(s) that cost(s) an excessive or unreasonable amount of money. Shop around for a repair person. Get a couple of estimates before having the repair made. After the repair is made, send a copy of the receipt for the repair to the landlord with the next rental payment, less the cost of repairs. Keep a copy in your records.
Remember the repair must fix a defect that affects your right to safe, decent housing. The court will not require the landlord to pay for a cosmetic repair.
If this did not happen, then the rent would be owed, as the deposit is to be used for repairs or damages and can not simply be applied, at your own discretion, to the November rent. If this is not settled or cured, the Judge can order the eviction