The habitability defense in a California eviction is the most common surprise landlords meet once a nonpayment case reaches a courtroom. You served the notice, you filed, the ledger is clean, and then the tenant tells the judge the heater never worked. For California rental property owners, knowing what that defense requires and what a judge does with it is the difference between a manageable outcome and a case lost on something avoidable.
Check this before you file anything
Start with the scenario that ends a case before it begins. Under Civil Code 1942.4, a landlord may not demand rent, collect rent, issue a rent increase, or serve a three day notice to pay or quit where a public officer responsible for housing enforcement gave written notice after inspection and the conditions went unabated 35 days beyond service of that notice without good cause. A landlord who does it anyway faces actual damages plus special damages of $100 to $5,000, and the prevailing party is entitled to attorney fees. Code of Civil Procedure 1174.21 adds fees where a nonpayment unlawful detainer is filed by a landlord liable under 1942.4.
Where the defense comes from
Assume the notice was clean. In Green v. Superior Court (1974) 10 Cal.3d 616, the California Supreme Court held that every residential lease carries an implied warranty of habitability and that a breach may be raised as a defense in an unlawful detainer for nonpayment. The duty to maintain and the duty to pay rent are mutually dependent, so a tenant who proves a breach can argue no rent was due and owing. If no rent was due, the landlord is not entitled to possession.
The standard is not perfection
Green does not require premises to be in perfect, aesthetically pleasing condition. It requires that bare living requirements be maintained. CACI No. 4320 instructs that missing one requirement does not automatically mean the property was uninhabitable, and that the failure must substantially affect habitability. Code of Civil Procedure 1174.2(c) defines a substantial breach as failure to comply with building and housing code standards that materially affect health and safety. A slow drain does not clear that bar. No heat in January does. The tenant also carries the burden of proof.
What counts, including the new appliance rule
Civil Code 1941.1 sets the list: weatherproofing including unbroken windows and doors, working plumbing and gas, hot and cold running water connected to approved sewage disposal, working heating and electrical, grounds free of debris, rodents and vermin, adequate garbage receptacles, and floors, stairways and railings in good repair. AB 628 added a working stove and refrigerator for leases entered into, amended, or extended on or after January 1, 2026, with a 30 day window to repair or replace a recalled appliance.
Four arguments that will not work
That the landlord had just found out and intended to fix it: Knight v. Hallsthammar (1981) 29 Cal.3d 46, 55 holds that where the landlord has notice of a condition the tenant did not cause, the breach exists whether or not there was a reasonable time to repair. That the tenant kept living there: CACI No. 4320 states continued occupancy does not necessarily mean the property is habitable. That the problem predates current ownership: Knight at 57 allows a tenant to defend against the current owner as to rent currently claimed due. That the tenant never used repair and deduct: Knight at 58 treats the habitability standards as available whether or not that remedy was used.
The centerpiece: the judge sets a price, not a winner
This is the part almost no landlord-facing material explains. Under Code of Civil Procedure 1174.2, if the court finds a substantial breach it determines the reasonable rental value of the premises in the untenantable state to the date of trial, denies possession, and adjudges the tenant the prevailing party, conditioned on the tenant paying the adjusted accrued rent within a period not exceeding five days from judgment. The court may order repairs, limits monthly rent to the reduced value until repairs are complete, and may award the tenant costs and fees. If the tenant fails to pay within that window, possession goes to the landlord. Erlach v. Sierra Asset Servicing, LLC (2014) 226 Cal.App.4th 1281, 1297 confirms the tenant remains liable for reasonable rental value for the period the defect existed. It is a discount followed by a deadline, not an eviction that disappears.
How the number is calculated
Courts use the percentage reduction method described in Green and set out in Cazares v. Ortiz (1980) 109 Cal.App.3d Supp. 23, 29. Start with the agreed contract rent, take testimony, find the percentage by which habitability was reduced, apply it, and multiply across the months of occupancy. As an illustration only, on $1,800 rent with a heater out four months and a thirty percent reduction, roughly $2,160 comes off what is
owed and rent is capped at $1,260 until repairs are finished. The percentage is a factual finding, and factual findings are made on evidence.
The same answer either way
Whether the tenant claim is accurate or invented, the response is identical: produce the record. Dated repair requests and responses, work orders and invoices, date-stamped photographs, notices of entry and any refused entry, inspection records, code enforcement correspondence, and the lease, ledger, notice and proof of service. A false claim collapses against a complete file. A true claim is contained by one.
If you are self-managing and not certain your documentation would survive a hearing like this, the free Self-Managing Cost Calculator puts a real number on what managing your own property is costing you, mistakes included: https://www.wellspringpm.com/c
This article is general information about California law and is not legal advice.