Cal. Civ. Proc. Code § 1161.4
(c) It is a rebuttable presumption that a tenant or occupant has established an affirmative defense under this section in an unlawful detainer action if the landlord did both of the following:
(2) Included in the unlawful detainer action a claim based on one of the following: