If you are being evicted for unpaid rent, you have some defenses. These must be included in your Answer to the Complaint the landlord made against you. (See my blog post “Your Eviction: What Happens After You’ve Been Served with an Unlawful Detainer?”)
Error in the Rent Calculation: The 3-day notice requested more rent than was actually due. To increase your chances of winning with this defense, you should have good records on what you paid your landlord. These records include a copy of your rental agreement and any subsequent rent increase notices. You should have a copy of your rent checks or any payment receipts. Good accounting is critical to asserting that the 3-day notice requested more rent than is due.
Unit Not Habitable: The rental unit violated the implied warranty of habitability. The law defines what makes a home safe and inhabitable. Your home must be fit for occupation by human beings. Your home must comply with the building and health codes that significantly affect your health and safety. In my legal experience, this defense is less clearly definable and more difficult to argue.
Retaliation: You have complained to a building inspector about the condition of your home. Or you have exercised one of your tenant rights. Your defense would be that the landlord is retaliating because of your actions. Like the defense of the unit not being habitable, in my legal experience this defense is less clearly definable and more difficult to argue.
There are ways to best present these defenses to help fight your eviction. You may wish to consult an attorney experienced in working for tenants so that your defense can be presented and argued well. You deserve your tenant rights to be protected.