Opinion
BIRD, C. J.This court must decide whether a residential tenant may be held to have impliedly waived a landlord’s breach of implied warranty of habitability by (1) continuing to live in premises despite knowledge of the defects or (2) failing to allow a landlord a reasonable time to repair before withholding rent. There is the additional question as to whether an unlawful detainer action may be defended based on a breach of implied warranty of habitability where defects in the premises predated the current ownership of the building.
I.
On May 18, 1977,1 plaintiff landlords became owners of a 30-unit apartment building at 1305 Ocean Front Walk in Venice, California. They had bought the property from a Norman Baker and his parents.
*50On May 19th, Western Investment Properties Inc. (hereinafter W.I.P.),, which had been hired by plaintiffs to manage the property, sent a letter to the tenants indicating there would be a substantial increase in the rent. On May 26th Clara Breit, as representative of the “1305 Ocean Front Walk Tenants Association,” sent a letter to W.I.P. stating that the tenants would withhold all future rent payments because of both the state of disrepair of the apartment building and the new rent increases. Neither W.I.P. nor plaintiffs responded to this letter.
When confronted in late May by tenants and the news media, an employee of W.I.P. allegedly indicated that the only repairs that would be made were to the vacant apartments and any common areas. No repairs were contemplated as to the occupied units until they became vacant. In early June, the tenants were served with three-day notices to pay the new rent or face eviction. These consolidated unlawful detainer actions by plaintiffs followed.
At the trial below, evidence was introduced by the tenants that plaintiffs had breached their implied warranty of habitability. The tenants complained of wall cracks, peeling paint, water leaks, heating and electrical fixture problems, broken or inoperable windows, rodents and cockroaches, and the lack of sufficient heat in the apartments. All of these conditions existed before plaintiffs acquired ownership. The defendants had personally complained to the manager about the conditions of their apartments before service of the three-day notices and before plaintiffs’ ownership. Some complaints had also been lodged with Norman Baker. Only a portion of the complaints had resulted in corrections.
Plaintiff James E. Knight testified that he had first inspected some of the units during escrow in April, and, in August, had made a detailed itemization of needed improvements. Knight also testified that he had made plans for major renovation of the common areas and exterior, and in June W.I.P. had coordinated bids for renovation of the common areas. Since assuming ownership, Knight had made a few improvements to the common areas. Knight went on to testify that in early June he hired a pest control company to spray the apartments, and that he retained the company on a monthly service basis. When he received a complaint about the elevator shaft, he took care of it and hired an elevator maintenance service to make monthly checks.
*51In August, Knight had heard some complaints about the lack of heating and about the fact that tenant Breit did not have a heater. He had had the manager install a steam radiator in Breit’s apartment in September. The central heating was not turned on at all during the summer.
Knight testified that the tenants had not paid him any rent, and that the reasonable value of the premises was that which was stated in the 30-day notices for rent increases which had been served on the tenants in May.
Jillian Reusch, a property manager for W.I.P., testified that she had received complaints from one of the tenants regarding broken windows and plumbing problems and that she had received the May 26th letter from the tenants’ association.
Lawrence Young, a health officer for Los Angeles County, testified that he had inspected a few of the apartments during five visits between June 2d and August 5th. During that period Young noted seven violations which were abated upon his orders. He testified that the violations did not render the building uninhabitable (condemnable) under health department standards. That definition refers to a lack of any water, hot or cold, and to extensive sewage leakage or structurally unsound conditions.
The jury was unable to reach a verdict with respect to three tenants but returned a verdict in favor of plaintiffs against four tenants. These appeals followed, based upon defendants’ claim that the trial court erroneously gave certain instructions requested by plaintiffs while refusing to give other instructions requested by defendants.
II
First, this court must address the issue of a residential tenant who continues to live in uninhabitable premises after learning of the defects and whether this fact waives the landlord’s breach of the implied warranty of habitability recognized by this court in Green v. Superior Court (1974) 10 Cal.3d 616 [111 Cal.Rptr. 704, 517 P.2d 1168].
In Green, a landlord commenced an unlawful detainer action seeking possession of leased premises and back rent. The tenant admitted non*52payment of rent but defended on the ground that the landlord had failed to maintain the premises in an habitable condition. This court held that there is in California a common law implied warranty of habitability in residential leases, and that under this warranty a landlord “covenants that premises he leases for living quarters will be maintained in a habitable state for the duration of the lease.” (Id., at p. 637.) Further, a tenant may raise a landlord’s breach of the implied warranty of habitability as a defense in an unlawful detainer proceeding. (Id., at pp. 622-629, 631-637.) Recognizing that at least one other court had held that such a warranty generally could not be waived by any provision in the lease or rental agreement, this court in Green stated that “public policy requires that landlords generally not be permitted to use their superior bargaining power to negate the warranty of habitability rule.” (Id., at p. 625, fn. 9.)2 “[T]he severe shortage of low and moderate cost housing has left tenants with little bargaining power .... [E]ven when defects are apparent the low income tenant frequently has no realistic alternative but to accept such housing with the expectation that the landlord will make the necessary repairs.”3 (Id., at p. 625.)
*53The court also noted that “the increasing complexity of modern apartment buildings not only renders them much more difficult and expensive to repair.. .but also makes adequate inspection of the premises by a prospective tenant a virtual impossibility; complex heating, electrical and plumbing systems are hidden from view, and the landlord, who has had experience with the building, is certainly in a much better position to discover and to cure dilapidations in the premises.” (Id., at p. 624.)
The declaration in Green of an implied warranty of habitability and of a public policy which generally prohibits waiver of that warranty is consistent with California’s statutory pattern of landlord-tenant relations. Provisions of the Civil Code “are to be liberally construed with a view to effect its objects and to promote justice.” (Civ. Code, § 4.) Further, “[a]ll contracts which have for their object, directly or indirectly, to exempt anyone from responsibility for .. .violation of law, whether willful or negligent, are against the policy of the law.” (Id., § 1668.) The Legislature has declared that “[t]he lessor of a building intended for the occupation of human beings must, in the absence of an agreement to the contrary, put it into a condition fit for such occupation, and repair all subsequent dilapidations thereof, which render it untenantable ....” (Id., § 1941.)4
Section 1942 of the same code provides a remedy by which a tenant may deduct rent payments needed to cure conditions which the landlord should have corrected. This statutory remedy is available only twice in any 12-month period and is not available unless the tenant has satisfied certain procedural prerequisites. However, the Legislature has recently made clear that “[t]he remedy provided by [section 1942] is in addition to any other remedy provided by this chapter, the rental agreement, or other applicable statutory or common law.” (Id., § 1942, subd. (d), added by Stats. 1979, ch. 307, § 3; see also Secretary of Housing & Urban Dev. v. Layfield (1978) 88 Cal.App.3d Supp. 28, 30 [152 Cal.Rptr. 342].)
*54The Legislature has further provided that “[a]ny agreement by a lessee of a dwelling waiving or modifying his rights under Section 1941 or 1942 shall be void as contrary to public policy with respect to any condition which renders the premises untenantable, except that the lessor and the lessee may agree that the lessee shall undertake to improve, repair or maintain all or stipulated portions of the dwelling as part of the consideration for rental.” (Civ. Code, § 1942.1; see also Green v. Superior Court, supra, 10 Cal.3d at p. 625, fn. 9.) This last exception is not present here since there was no agreement by a tenant to repair the premises.
In the present case, the trial court instructed the jury that a tenant may not defend an unlawful detainer action upon the basis of a landlord’s breach of the implied warranty of habitability unless “[t]he defective condition was unknown to the tenant at the time of the occupancy of his or her apartment.” However, the fact that a tenant was or was not aware of specific defects is not determinative of the duty of a landlord to maintain premises which are habitable. The same reasons which imply the existence of the warranty of habitability-—the inequality of bargaining power, the shortage of housing, and the impracticability of imposing upon tenants a duty of inspection—also compel the conclusion that a tenant’s lack of knowledge of defects is not a prerequisite to the landlord’s breach of the warranty. (See Green v. Superior Court, supra, 10 Cal.3d at pp. 624-625.)5 Therefore, the trial court erred in giving this instruction.
Next, this court must decide whether the trial court erred when it instructed the jury that a breach of the implied warranty of habitability would be a defense to the unlawful detainer action only if plaintiff landlords had been allowed “a reasonable time to correct the defect while the tenant remained in possession.” As pointed out by the Supreme Judicial Court of Massachusetts, “[t]he landlord’s lack of fault and reasonable efforts to repair do not prolong the duty to pay full rent.” (Berman & Sons, Inc. v. Jefferson (1979) — Mass. — [396 *55N.E.2d 981, 983]; see also Jarrell v. Hartman (1977) 48 Ill.App.3d 985 [363 N.E.2d 626, 628, 6 Ill.Dec. 812].) Also, it is significant that section 1941 of the California Civil Code speaks of a lessor’s duty to put a building into a condition fit for occupation and to repair all later defects which make the premises uninhabitable. At least in a situation where, as here, a landlord has notice of alleged uninhabitable conditions not caused by the tenants themselves,6 a landlord’s breach of the implied warranty of habitability exists whether or not he has had a “reasonable” time to repair. Otherwise, the mutual dependence of a landlord’s obligation to maintain habitable premises, and of a tenant’s duty to pay rent, would make no sense. (See Green v. Superior Court, supra, at pp. 634, 635.) Accordingly, the trial court erred in instructing that the tenants could not succeed in their defense unless the landlords had been allowed a “reasonable” time to repair.7
Did the trial court also err when it instructed the jury in the language of Civil Code section 823? This raises the issue as to whether a residential tenant may defend an unlawful detainer action brought by a current landlord based on uninhabitable conditions which have existed since the tenant entered possession under a former owner.
The trial court instructed the jury as follows: “Civil Code Section 823 provides: Whatever remedies the lessee of any real property may have against his immediate lessor, for the breach of any agreement in the lease, he may have against the assigns of the lessor, and the assigns of the lessee may have against the lessor and his assigns, except upon covenants against encumbrances or relating to the title or possession of the premises.”
The court refused the following instruction requested by defendants: “In the present case, the plaintiffs are the assignees of leases entered into between the former owners and defendants. The effect of the as*56signment is to transfer the interest of the former owners in the leased property to plaintiffs. The plaintiffs stand in the shoes of the former owners, taking their rights and remedies, subject to any defenses which the defendants had prior to the notice of the assignment. The plaintiffs can gain no better position than the former owners had with respect to the subject matter of the assignment.”
Defendants contend that the change in ownership from the Bakers to plaintiffs did not terminate the tenants’ rights to assert the breach of warranty of habitability defense as to the continuing breaches on the part of plaintiffs. Therefore, instructing the jury on Civil Code section 823 was inappropriate and confusing. On the other hand, plaintiffs argue that Civil Code section 823 applies to the present case because a successor landlord should not be held liable for a previous owner’s breach of the implied warranty of habitability.
All parties rely on Standard Livestock Co. v. Pentz (1928) 204 Cal. 618 [269 P.645, 62 A.L.R. 1239], which dealt with an implied covenant of quiet enjoyment in a lease. There, the court stated that Civil Code section 823 “by its terms relates to ‘remedies’ as distinguished from ‘rights’ and when so considered its meaning is clear. The remedy which a lessee of premises has against the lessor, or his assigns, for an accrued or already created breach of any agreement in the lease passes to the lessee’s assigns, and may be asserted by the latter against the lessor or his assigns. The two exceptions expressed in the section are that accrued remedies for already ripened breaches of covenants against encumbrances or relating to the title or possession of the premises do not so pass but remain with the original lessee. But neither of these exceptions nor in fact the section as a whole has any reference to breaches of the lease which have not occurred, nor to remedies therefor which have not arisen prior to the assignment of the lease. The assignment of a lease when legally accomplished transfers to the assignee thereof the right to the enforcement of every unbroken covenant which the lease contains, but does not transfer those ripened choses in action which come within the exceptions in the . . . code. ...” (Id., at pp. 629-630.)
This language from Standard Livestock Co. is not helpful in this case and does not support plaintiffs’ contention that the tenants were not entitled to assert as a defense in the present lawsuit a breach of the implied warranty of habitability by the current landlords. There is no cross-complaint by the tenants against a new landlord for damages caused by a previous owner. Nor is there any claim by the tenants for *57retroactive rent reductions for any period before the change of ownership. Therefore, it is unnecessary to decide such questions as the applicability of Civil Code section 823 to a tenant’s affirmative action against a new owner, or whether the implied warranty of habitability is an “agreement in the lease” or a covenant “relating to ... possession of the premises” within the meaning of that section. Similarly, this court need not decide the defendants’ contention that the products liability exception to the general rule against imposing liabilities of a predecessor corporation upon its successor should apply in landlord-tenant cases. (See Ray v. Alad Corp. (1977) 19 Cal.3d 22 [136 Cal.Rptr. 574, 560 P.2d 3].)
The undisputed facts of the present case are that all of the defendant tenants had personally complained to the resident manager about various conditions before plaintiffs assumed ownership of the apartments. One day after plaintiffs became the owners, they announced that every tenant’s rent would be raised. One week later, plaintiffs’ agent was notified of the tenants’ complaints and that the rent was going to be withheld. Any plans of the new owners to repair and improve the building did not negate the tenants’ defense, since plaintiffs were already in breach of their implied warranty of habitability, if the premises were indeed uninhabitable. Moreover, the change of ownership was an event over which the tenants had no control. Therefore, a tenant may defend an unlawful detainer action against a current owner, at least with respect to rent currently being claimed due, despite the fact that the uninhabitable conditions first existed under a former owner.
The trial court’s instruction in terms of Civil Code section 823 may well have confused the jury and caused them to think that the tenants had no defense against the owners if the premises had been uninhabitable before the change of ownership. Accordingly, the court erred when it gave this instruction.
Finally, the tenants contend that the trial court’s instructions failed to define adequately the term “habitability.” The court’s instructions spoke of a “materially defective condition affecting habitability.”8 *58The trial court refused any instructions which purported to list the specific housing requirements “of state or local law” as contained in Civil Code section 1941.1,9 the Los Angeles Municipal Code, or the California Administrative Code. Plaintiffs argue that the standards set forth in section 1941.1 of the Civil Code do not apply because the defendants used the breach of the implied warranty of habitability as a defense rather than using the statutory remedy of “repair and deduct” as set forth in section 1942.
Without evaluating the propriety of instructing the jury on each item included in the defendants’ requested instruction, it is clear that, where appropriate under the facts of a given case, tenants are entitled to instructions based upon relevant standards set forth in Civil Code section 1941.1 whether or not the “repair and deduct” remedy has been used.
Section 1941.1 begins with the language, “A dwelling shall be deemed untenantable for purposes of Section 1941 if it substantially lacks any of the following affirmative standard characteristics . . .. ” The duty of a landlord to maintain fit premises is set forth in section *591941, and there is nothing in that section which demonstrates a legislative intent that the duty of a landlord varies based on whether a tenant relies on the statutory remedy of “repair and deduct” or the common law as set forth in Green v. Superior Court, supra. Indeed, the “repair and deduct” statute is explicitly independent of any other available remedy. (See Civ. Code, § 1942, subd. (d).)10
III.
Under Green v. Superior Court, supra, a residential tenant may not be deemed to have exempted a landlord from the implied warranty of habitability by continuing to live in uninhabitable premises, and breach of the warranty does not and should not depend upon a tenant’s lack of knowledge of the conditions which make the premises uninhabitable. Further, in an unlawful detainer action, a tenant’s defense that a landlord has breached an implied warranty of habitability should not depend on whether the landlord has had a “reasonable” time to repair, because the issue is whether the premises are in fact inhabitable. Nor should that defense depend on the fortuitous circumstance of a change in ownership of the premises.
The trial court’s erroneous instructions to the jury and failure to set forth properly the standards of habitability were likely to mislead the jury, and therefore the judgment is reversed. (See Henderson v. *60Harnischfeger Corp. (1974) 12 Cal.3d 663, 670 [117 Cal.Rptr. 1, 527 P.2d 353].)
Tobriner, J., Mosk, J., Richardson, J., and Newman, J., concurred.
All of the events herein took place in 1977 except as otherwise indicated.
As stated by the Supreme Court of Washington, “[a] disadvantaged tenant should not be placed in a position of agreeing to live in an uninhabitable premises. [Uninhabitable] [h]ousing conditions .. . are a health hazard, not only to the individual tenant, but to the community .... [S]uch housing conditions are at least a contributing cause of such problems as urban blight, juvenile delinquency and high property taxes for the conscientious landowners.” (Foisy v. Wyman (1973) 83 Wn.2d 22 [515 P.2d 160, 164-165]; see also Javins v. First National Realty Corporation (D.C. Cir. 1970) 428 F.2d 1071, 1080 at fn. 49, 1082 at fn. 58; Boston Housing Authority v. Hemingway (Mass. 1973) 363 Mass. 184 [293 N.E.2d 831, 843]; Fair v. Negley (1978) [257 Pa.Super. 50] [390 A.2d 240, 243-245]; Teller v. McCoy (W.Va. 1978) 253 S.E.2d 114, 130-131; but see Mease v. Fox (Iowa 1972) 200 N.W.2d 791, 797, 798; see also Moskovitz, The Implied Warranty of Habitability: A New Doctrine Raising New Issues (1974) 62 Cal.L.Rev. 1444, 1448.)
The California Legislature has recognized the dearth of affordable housing in this state. “The Legislature finds and declares that, as a result of public actions involving highways, public facilities, and urban renewal projects, and as a result of poverty and the spread of slum conditions and blight to formerly sound neighborhoods, there exists within the urban and rural areas of the state a serious shortage of decent, safe, and sanitary housing which persons and families of low or moderate income, including the elderly and handicapped, can afford. This situation creates an absolute present and future shortage of supply in relation to demand, as expressed in terms of housing needs and aspirations, and also creates inflation in the cost of housing, by reason of its scarcity, which tends to decrease the relative affordability of the state’s housing supply for all its residents. [H]... To provide a decent home and suitable living environment for every California family is the basic housing goal of state government....” (Health & Saf. Code, § 50003, subds. (a) and (b); see also Cal. Statewide Housing Plan 1979 Update, Dept. of Housing and Community Development.)
The Legislature has also declared “that the subject of housing is of vital statewide *53importance to the health, safety, and welfare of the residents of this state” (Health & Saf. Code, § 50001) and that “[u]nsanitary, unsafe, overcrowded, or congested dwelling accommodations constitute conditions which cause an increase in, and spread of, disease and crime.” (Id., § 50001, subd. (b).)
Section 1941 of the Civil Code is subject to the exception that “(t)he hirer of a thing must repair all deteriorations or injuries thereto occasioned by his want of ordinary care.” (Id., § 1929; see also, § 1941.2.)
It should be noted that the trial court’s instructions also required that, in order for a defective condition to be a defense, “[t]he effect on habitability of the defective condition [must not have been] apparent to the tenant upon a reasonable inspection.” This instruction suggests that a new tenant has a duty to inspect a residence for defects which may render the premises uninhabitable. If a tenant fails to discharge this duty reasonably, he is barred from using such defects as á defense to an action for unlawful detainer. This imposition of a duty of reasonable inspection on prospective tenants is inconsistent with Green v. Superior Court, supra, 10 Cal.3d at page 624, and the trial court’s instruction in this regard was, therefore, erroneous.
Berman & Sons, Inc. and Jarrell appear to reach opposite results as to whether the tenant’s obligation to pay full rent continues until the landlord has notice that the premises are uninhabitable. (Compare Berman & Sons, Inc. v. Jefferson, supra, 396 N.E.2d at p. 983, with Jarrell v. Hartman, supra, 363 N.E.2d at p. 628.) In the present case, the trial court’s instruction stated that notice to a landlord of breach of warranty was required. That portion of the instruction has not been challenged on appeal. Therefore, that issue is not considered here.
The trial court based its instructions in part on Quevedo v. Braga (1977) 72 Cal.App.3d Supp. 1 [140 Cal.Rptr. 143]. To the extent that Quevedo and Hinson v. Delis (1972) 26 Cal.App.3d 62 [102 Cal.Rptr. 661] are inconsistent with the views expressed herein, they are disapproved.
The trial court also instructed the jury that “[t]he implied warranty of habitability relates to conditions which affect the tenant’s bare living requirements. It does not extend to what may be called amenities. Amenities as distinguished from living requirements in some situations include living with lack of or unsightly painting, water leaks, wall cracks or defective or malfunctioning Venetian blinds .... Minor housing code violations which do not affect habitability will not entitle the tenant to a reduction in rent."
Civil Code section 1941.1 provides: “A dwelling shall be deemed untenantable for purposes of Section 1941 if it substantially lacks any of the following affirmative standard characteristics:
“(a) Effective waterproofing and weather protection of roof and exterior walls, including unbroken windows and doors.
“(b) Plumbing or gas facilities which conformed to applicable law in effect at the time of installation, maintained in good working order.
“(c) A water supply approved under applicable law, which is under the control of the tenant, capable of producing hot and cold running water, or a system which is under the control of the landlord, which produces hot and cold running water, furnished to appropriate fixtures, and connected to a sewage disposal system approved under applicable law.
“(d) Heating facilities which conformed with applicable law at the time of installation, maintained in good working order.
“(e) Electrical lighting, with wiring and electrical equipment which conformed with applicable law at the time of installation, maintained in good working order.
“(f) Building, grounds and appurtenances at the time of the commencement of the lease or rental agreement in every part clean, sanitary, and free from all accumulations of debris, filth, rubbish, garbage, rodents and vermin, and all areas under control of the landlord kept in every part clean, sanitary, and free from all accumulations of debris, filth, rubbish, garbage, rodents, and vermin.
“(g) An adequate number of appropriate receptacles for garbage and rubbish, in clean condition and good repair at the time of the commencement of the lease or rental agreement, with the landlord providing appropriate serviceable receptacles thereafter, and being responsible for the clean condition and good repair of such receptacles under his control.
“(h) Floors, stairways, and railings maintained in good repair.”
However, this court does not attempt to set forth a complete definition of “uninhabitable” conditions or to delineate all instructional requirements for trial courts in particular cases. (See generally Li v. Yellow Cab Co. (1975) 13 Cal.3d 804, 826 [119 Cal.Rptr. 858, 532 P.2d 1226, 78 A.L.R.3d 393].) For example, the Green case stated that “[i]n most cases substantial compliance with those applicable building and housing code standards which materially affect health and safety will suffice to meet the landlord’s obligations under the common law implied warranty of habitability .... ” (Green v. Superior Court, supra, 10 Cal.3d at p. 637.) On the other hand, “while certainly a factor in the measurement of the landlord’s obligation, violation of a housing code or sanitary regulation is not the exclusive determinant of whether there has been a breach.” (Park West Management Corp. v. Mitchell (1979) 47 N.Y.2d 316 [418 N.Y.S.2d 310, 316, 391 N.E.2d 1296].) Moreover, particular statutory or regulatory requirements, other than those set forth in California Civil Code section 1941.1, may or may not relate to habitability or be appropriate as jury instructions. A landlord’s violation of particular statutory or regulatory provisions which do not by definition affect habitability may or may not result in uninhabitable premises according to particular facts.
In the present case, it is significant that the definition of “uninhabitable” used by Young, the health officer, was not the same standard set forth in Green v. Superior Court, supra, but rather was that used to condemn a building.