CALIFORNIA CIVIL CODE
1942. (a) If within a reasonable time after written or oral notice to the landlord or his agent, as defined in subdivision (a) of Section 1962, of dilapidations rendering the premises untenantable which the landlord ought to repair, the landlord neglects to do so, the tenant may repair the same himself where the cost of such repairs does not require an expenditure more than one month's rent of the premises and deduct the expenses of such repairs from the rent when due, or the tenant may vacate the premises, in which case the tenant shall be discharged from further payment of rent, or performance of other conditions as of the date of vacating the premises. This remedy shall not be available to the tenant more than twice in any 12-month period.
(b) For the purposes of this section, if a tenant acts to repair and deduct after the 30th day following notice, he is presumed to have acted after a reasonable time. The presumption established by this subdivision is a rebuttable presumption affecting the burden of producing evidence and shall not be construed to prevent a tenant from repairing and deducting after a shorter notice if all the circumstances require shorter notice.
(c) The tenant's remedy under subdivision (a) shall not be available if the condition was caused by the violation of Section 1929 or 1941.2.
(d) The remedy provided by this section is in addition to any other remedy provided by this chapter, the rental agreement, or other applicable statutory or common law.