Skip to content

California housing law

Habitability & Repair-and-Deduct — Civil Code §§ 1941–1942

The list of conditions that make a California rental legally uninhabitable, the locks a landlord must install and maintain, and the tenant's own remedy — repair-and-deduct — when the landlord won't fix it.

Key points

Civil Code §§ 1941.1, 1941.3, 1942 Health & Safety Code §§ 17920.3, 17980 (substandard buildings) The statutory list of untenantable conditions Deadbolt & window-lock requirements Repair-and-deduct: capped at one month's rent Repair-and-deduct: at most twice in any 12 months Code-enforcement abatement process Stove & refrigerator now on the habitability list (2026)
Last reviewed: September 26, 2026

California law does not leave "habitable" undefined. Civil Code § 1941.1 lists the specific conditions a dwelling must have to be tenantable, § 1941.3 sets minimum lock and window-security requirements, and § 1942 gives the tenant a direct remedy — repair-and-deduct — when the landlord won't fix a problem it lists.

A parallel track runs through the Health and Safety Code: § 17920.3 defines a "substandard building" for local code enforcement, and § 17980 sets out how a city or county actually forces repairs. A single bad condition can matter under both tracks at once, which is why GoCodebook checks all five sections together before answering a habitability question.

What makes a unit uninhabitable

Under § 1941.1, a dwelling is untenantable if it substantially lacks: effective waterproofing and weather protection (including unbroken windows and doors); working plumbing and gas facilities; hot and cold running water connected to an approved sewage system; working heating; code-conforming electrical lighting and wiring; clean, debris-free grounds and building areas; adequate garbage receptacles; floors, stairways and railings in good repair; and, for a residential hotel, a locking mail receptacle.

Two items were added for leases entered into, amended, or extended on or after January 1, 2026: a working stove and a working refrigerator (§ 1941.1(a)(10)–(11)). A landlord must repair or replace either one within 30 days of learning it is subject to a manufacturer or public-entity recall (§ 1941.1(c)(1)). Both requirements are excused for permanent supportive housing, single-room-occupancy units, residential hotels, and units with shared or communal kitchens (§ 1941.1(b)).

Locks and window security devices

Section 1941.3 requires an operable deadbolt on each main swinging entry door, extending at least 13/16 of an inch beyond the strike edge, on every unit as of July 1, 1998. It also requires operable locking devices on windows designed to be opened — excluding louvered windows, casement windows, and any window more than 12 feet vertically or 6 feet horizontally from the ground, a roof, or another platform (§ 1941.3(a)(2)).

The tenant is responsible for telling the landlord when a lock stops working; the landlord is only liable for a violation if it fails to fix the problem within a reasonable time after getting notice (§ 1941.3(b)). Buildings that a government body has designated as historically significant are exempt from these requirements entirely (§ 1941.3(f)).

Repair-and-deduct: the tenant's own remedy

If the landlord neglects to repair a condition that makes the unit untenantable within a reasonable time after written or oral notice, the tenant may repair it themselves — as long as the cost does not exceed one month's rent — and deduct that cost from rent due, or the tenant may vacate and be discharged from further rent (§ 1942(a)). Acting after the 30th day following notice is presumed to be a reasonable wait, though a tenant may act sooner if the circumstances require it (§ 1942(b)).

This remedy is capped: it is not available more than twice in any 12-month period (§ 1942(a)). It is also unavailable if the tenant caused the condition through their own violation of the law (§ 1942(c)). A landlord who retaliates against a tenant for using this remedy runs into § 1942.5's retaliation rules.

When code enforcement gets involved

Health & Safety Code § 17920.3 defines a "substandard building" through a categorical list — inadequate sanitation, structural hazards, faulty weather protection, nuisance conditions, fire hazards, and more — regardless of the property's zoning. Under § 17980, an enforcement agency must give 30 days' notice to abate a violation before acting, or a shorter period if it finds an immediate threat to health and safety (§ 17980(a)).

The agency must let the owner choose repair or demolition, and it must prefer repair whenever it is economically feasible to do so without repairing more than 75 percent of the dwelling (§ 17980(c)(2)). A person who buys a foreclosed property gets an extra 60 days after taking title, while diligently abating a violation, before the agency may act — unless a shorter period is needed to address an immediate threat (§ 17980(a)).

Who this affects

LandlordsTenantsProperty managersReal estate attorneysHousing counselorsTenant-rights advocates

Frequently asked questions

What makes a rental unit legally uninhabitable in California?

Under Civil Code § 1941.1, a unit that substantially lacks weatherproofing, working plumbing, hot and cold water, heating, safe electrical wiring, clean common areas, or (since 2026, for newer leases) a working stove and refrigerator is untenantable.

What is "repair-and-deduct" and how much can I spend?

Under Civil Code § 1942, if the landlord doesn't fix an untenantable condition within a reasonable time after notice, the tenant may make the repair and deduct the cost from rent — but only up to one month's rent.

How often can I use repair-and-deduct?

At most twice in any 12-month period (§ 1942(a)). Acting more than 30 days after giving notice is presumed reasonable, but the remedy is unavailable if the tenant caused the condition.

What locks is a landlord required to provide?

A deadbolt at least 13/16 of an inch long on each swinging entry door, and operable locks on most windows designed to open (§ 1941.3), with an exception for historically significant buildings.

Can the city force a landlord to fix a substandard building?

Yes. Under Health & Safety Code § 17980, a code enforcement agency can order repair or demolition after 30 days' notice (shorter if there is an immediate health or safety threat).

Does a landlord have to provide a stove and refrigerator?

For leases entered into, amended, or extended on or after January 1, 2026, yes — both must be in good working order, with limited exceptions for supportive housing, SROs, residential hotels, and shared-kitchen units (§ 1941.1(a)(10)–(11), (b)).

General information, not legal advice.

Is this condition a habitability violation?

Ask GoCodebook about any California rental and get a cited answer on habitability standards, repair-and-deduct limits, and the code-enforcement process.

Ask your question

More California housing laws