
    [L.A. No. 31235.
    Feb. 13, 1981.]
    JAMES E. KNIGHT et al., Plaintiffs and Respondents, v. MARIA HALLSTHAMMAR, Defendant and Appellant; JAMES E. KNIGHT et al., Plaintiffs and Respondents, v. CECELIA DeCAPRIO, Defendant and Appellant; JAMES E. KNIGHT et al., Plaintiffs and Respondents, v. CLARA BREIT, Defendant and Appellant.
    
      Counsel
    Ronald L. Rouda, Robert M. Myers and Michael E. Wine for Defendants and Appellants.
    Toby J. Rothschild, Marvin E. Krakow, Neil J. Roberts, David B. Harrison, Richard A. Elbrecht, A. Paul Griebel, Kathleen E. Doyle, Laura W. Kaplan, Dorothy Jones, Roger Dickinson, Myron Moskovitz, Richard E. Blumberg, Ronald S. Javor, Charles F. Palmer and Carol Kuntz Lysaght as Amici Curiae on behalf of Defendants and Appellants.
    Robert E. Canny and David M. Glasser for Plaintiffs and Respondents.
   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, 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.

On 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.

In 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 nonpayment 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.) “[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.” (Id., at p. 625.)

The 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.)

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].)

The 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.) 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 N.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, 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.

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 assignment 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 retroactive 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.” The 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, 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 1941, 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).)

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. Harnischfeger 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.

CLARK, J.

I dissent.

In these consolidated unlawful detainer actions, the jury after a 15-day trial in September and October 1977 returned a verdict against appellants Maria Hallsthammar, Clara Breit, and Cecelia DeCaprio. The jury was unable to reach agreement as to three other tenants. Pursuant to the jury verdicts, the judgments awarded plaintiffs possession of appellants’ apartments and $625 against Hallsthammar and Breit and $575 against DeCaprio. The sums represent five months rent. The appeal is based on a joint settled statement.

The following facts should be emphasized. Plaintiffs purchased a 30-unit apartment building on Ocean Front Walk in Venice, California, on 18 May 1977. They retained the resident manager who had been there 30 years. The following day a letter was sent to each tenant announcing substantial rent increases beginning 1 July. The letter also stated the new owners would immediately undertake extensive refurbishment of the common areas in the buildings. Moreover, tenants were advised to inform the manager of problems and were provided with alternative phone numbers in case the manager was unavailable or emergencies arose.

On 26 May, appellant Breit, as a representative of the tenants association, sent a letter notifying plaintiffs that further rental payments were being withheld because of the existing disrepairs and new rent increases. There was no response to the letter. Some tenants picketed the premises, seeking to dissuade prospective tenants from renting. Incidents of vandalism and harassment of owners were reported.

The evidence as to the apartments of the three appellants reveals an open space existed under the front door of Breit’s apartment permitting air and dirt to blow in. The light in the bathroom burned out often necessitating replacement. The refrigerator-freezer door could come off its hinges, and cracks were reported in a window. The living room electrical outlet voltage was insufficient to operate all of the household appliances. Although Breit had had problems with cockroaches, there was no evidence as to how often or how many. After she complained there was no heater, the resident manager installed a radiator for her.

DeCaprio did not testify as to the condition of her apartment. However, the record indicates she reported broken window and plumbing problems sometime in early June. They were repaired. There also had been cockroaches in her apartment but again the evidence did not disclose how often or how many.

The radiator in Hallsthammer’s apartment never functioned properly during her rental period; only two of the seven spokes would heat up. And although the leak in her sink was fixed in late June, there were many cracks in the walls and ceilings, and paint peeling near a window. The kitchen light switch was defective. As a result, Hallsthammer had to unscrew the lightbulb to turn off the light. She told the resident manager about these problems many times but did not telephone the owners. Unlike the other two apartments, there were no cockroaches reported.

There was evidence the building’s hallways were inadequately lighted and dirty, some carpeting was old and frayed, the lobby area was often dirty and the elevator sometimes failed to stop at floor level. The central heating was turned off in early summer before plaintiffs purchased the building and remained off through the summer and until trial of the instant case in mid-October.

The owners sought bids for renovation after taking possession. They painted the front entrance and some of the hallway French doors and windows. New carpeting was placed in the elevator, hallways and landings. Repairs were made to hallways and back stairway. The owners contracted with a pest control company in June for monthly and on-call service and on 19 June the company sprayed for cockroaches. They also employed an elevator maintenance firm for monthly servicing. They refurbished vacant apartments by repainting, recarpeting the living areas, placing new vinyls on kitchen and bathroom floors, and in about five apartments, converting the bathtub to shower-tub combination. During the rent strike, plaintiffs paid utilities and received from the prior owners a grace period on trust deed payments.

A county health department officer inspected the building on 2 June and four times thereafter. He found seven violations and ordered plaintiffs to abate; plaintiffs complied. The health officer testified the offenses were minor in nature and did not render the premises uninhabitable under health department condemnation standards, to wit when a building or portion of it is totally unfit for human habitation with no fresh water, hot or cold, extensive sewage leakage, or structurally unsound conditions.

Appellants do not claim the evidence establishes the defense of uninhabitability as a matter of law or that the evidence is insufficient to support the verdict. Rather, they challenge certain instructions given and also assert the trial judge erroneously refused other instructions. Before discussing the specific instructions, we must examine the implied warranty of habitability.

The traditional common law doctrine, long followed in California, holds that a landlord, absent contrary agreement, is under no duty to maintain leased dwellings in habitable condition. Furthermore, landlord agreements to repair premises are independent of the tenant’s covenant to pay rent. (Green v. Superior Court (1974) 10 Cal.3d 616, 619, 622-623, 634-635 [111 Cal.Rptr. 704, 517 P.2d 1168].)

Pointing out in Green that contemporary urban conditions differ greatly from earlier rural conditions, we approved Hinson v. Delis (1972) 26 Cal.App.3d 62 [102 Cal.Rptr. 661], recognizing a common law warranty of habitability. Green stated that while in earlier times the land itself was the most important element of a lease transaction the typical apartment house dweller could not realistically be viewed as acquiring a landed interest but rather as contracting for a place to live. (10 Cal.3d at pp. 622-623.) For this reason, contractual principles were increasingly applied to lease agreements, particularly those in modern apartment buildings where repairs may be difficult and expensive. Complex heating, electrical, and plumbing systems are often hidden from view and repairs require access to areas solely within the landlord’s control. Moreover, tenants are often ill-equipped to make repairs given the short term of leases and inability to obtain financing for major repairs. (10 Cal.3d at pp. 624-625.)

Relying upon commercial law cases involving warranties of fitness and merchantability, modern legislation providing that landlords bear primary responsibility for maintaining safe and clean housing, and Hinson v. Delis, supra, 26 Cal.App.3d 62 [102 Cal.Rptr. 661] as well as decisions of other states, we concluded that warranty of habitability is implied by law in residential leases in this state. (10 Cal.3d at pp. 626-629, 637.)

We defined the implied warranty as a covenant that the premises will be maintained in a habitable state. “This implied warranty of habitability does not require that a landlord ensure that leased premises are in perfect, aesthetically pleasing condition, but it does mean that ‘bare living requirements’ must be maintained. In most cases substantial compliance with those applicable building and housing code standards which materially affect health and safety will suffice to the landlord’s obligations under the common law implied warranty of habitability we now recognize. As the Hinson court observed: ‘[m]inor housing code violations standing alone which do not affect habitability must be considered de minimis and will not entitle the tenant to reduction in rent ....’ (26 Cal.App.3d at p. 70.)” (10 Cal.3d at pp. 637-638, fns. omitted.)

Green also held that breach of the implied warranty, while a defense in an unlawful detainer action, does not relieve the tenant from paying rent. Pointing out that the trial court could require payment of contractual rent into court pending trial, we recognized that even if the tenant establishes a defense, he remains liable for fair rental value of the premises in the defective condition. (10 Cal.3d at pp. 636-637, 638-639.)

Instructions

A. Waiver

Appellants claim that the implied warranty of habitability may not be waived and that the trial court erred in instructing the jury that in order to defend an unlawful detainer action on the ground of breach of implied warranty, it must appear the tenant did not have knowledge of the condition at the time of occupancy.

However, it is clear that a tenant aware of the apartment’s defects at the time of rental, and aware the landlord has not expressly agreed to repair or improve, may not thereafter withhold rent while defending an unlawful detainer action on the basis of known defects. (Quevedo v. Braga (1977) 72 Cal.App.3d Supp. 1, 7 [140 Cal.Rptr. 143].)

In a free market community, the primary determinant of agreed rent is the physical condition of the premises. The lessor is ordinarily aware of rent charged for comparable properties in nearby locations. The tenant chooses his apartment in light of rent demanded for comparable premises, aware of other apartments offering more or fewer advantages. The relationship between physical condition of the premises and rentals is illustrated by the facts of this case. So long as the rents remained low, the tenants paid the rent notwithstanding the physical conditions assertedly rendering the premises uninhabitable.

Should the tenant be permitted to conclude his bargain aware of the shortcomings of the premises, then later require the lessor to provide improved property at the earlier agreed rental?

Only the most compelling circumstances should prevent the tenant and landlord from freely agreeing the premises shall be leased in whatever condition for commensurate rent, both aware that better premises would call for higher rent. For example, in some of the mild weather areas, tenants may be willing to forego heating facilities in view of the low rent charged. Similarly, willing parties should not be prevented from agreeing the tenant will undertake improving the premises for commensurate rent.

Civil Code section 1941 setting forth landlord duty to place premises in habitable condition provides the duty is imposed “in the absence of an agreement to the contrary.”

Green effectively recognized the implied warranty may be waived in appropriate situations. First, in defining the warranty we repeatedly spoke in terms of maintaining the leased premises, duty to maintain habitable premises or duty to repair rather than a duty to construct new improvements. (E.g., 10 Cal.3d at pp. 623, 625, 637.) Similarly, the court spoke of the legitimate expectation of the tenant that the premises will be fit for habitation during the duration of the lease term. (10 Cal.3d at p. 627.) No such expectation exists when the tenant is aware of a defective physical condition upon leasing and the landlord has not indicated he would repair or improve.

Second, much of the reasoning in Green reflects that in appropriate circumstances the implied warranty may be waived. Thus, in Green we analogized to the implied warranty of fitness and merchantability in the sale of goods. (10 Cal.3d at p. 626.) In such sale, the circumstances may negative or exclude the implied warranties. (Cal.U. Com. Code, § 2316; 2 Witkin, Summary of Cal. Law (8th ed. 1973) pp. 1146-1147.) Again, what are the expectations of the parties?

Third, the new common law rules adopted in Green may in some cases create waiver. We held in Green that breach of the implied warranty of habitability creates a defense in unlawful detainer actions on the theory that the breach was directly related to the rent due and thus to the right of possession—the issue litigated in the summary unlawful detainer proceedings. (10 Cal.3d at p. 635.) We also recognized that when the tenant establishes breach of the implied warranty, the landlord remains entitled to the fair rental value of the defective premises and unless paid may reacquire possession. (10 Cal.3d at pp. 638-639.) When the contracted rent is equal to or less than fair rental value, the Green rule itself creates a waiver of the implied warranty.

It is true that in Green, footnote 9, we stated that public policy requires that the implied warranty “generally could not be waived by any provision in the lease or rental agreement.” (10 Cal.3d at p. 625.) However, the statement refers to general contractual waivers and should not be read to prohibit specific waivers of conditions existing at the time the lease is executed. Otherwise a tenant, fully aware of the defects and having no expectation of landlord repair, could enter a lease at low rent and later refuse payment. The implied covenant should not permit inequitable conduct.

Accordingly, when a tenant is aware of the defect at the time the lease is entered and it is apparent the landlord will not repair, the tenant may not defend an unlawful detainer action on the ground the defect is a breach of implied warranty of habitability. There was no error in instructing the jury that in order to defend on that ground a tenant must establish he was unaware of the defect at the time the lease was entered.

The trial court also instructed that in order to establish the defense of breach of implied warranty the tenant must notify the landlord of the alleged defect within a reasonable time after he discovered it, or should have discovered it. (See fn. 4.)

When a tenant, aware the premises are not habitable, continues to pay the agreed rent without complaint, he reflects that he did not contemplate repairs by the landlord, that in light of the rent charged he is willing to bear the defects, or that he does not consider the claimed defects sufficiently important to render the premises uninhabitable.

In any event, it would be inequitable to permit the tenant to continue occupying the premises for months or perhaps years paying rent without complaint and then seek to recover that rent on the basis of breach of the implied warranty. (Cal.U. Com. Code, § 2607, subd. (3); Greenman v. Yuba Power Products, Inc. (1963) 59 Cal.2d 57, 61 [27 Cal.Rptr. 697, 377 P.2d 897, 13 A.L.R.3d 1049].) In addition, in many cases the cost of repair would be minor whereas the impairment of use would be substantial. Clearly, it would be inequitable to permit the tenant to remain on the premises paying rent without complaint and then recover substantial rent on the basis of breach of implied warranty.

In Pollard v. Saxe & Yolles Dev. Co. (1974) 12 Cal.3d 374, 380 [115 Cal.Rptr. 648, 525 P.2d 88], concluding a warranty of quality exists for sales of new buildings, we imposed the notice requirement. “The requirement of notice of breach is based on a sound commercial rule designed to allow the defendant opportunity for repairing the defective item, reducing damages, avoiding defective products in the future, and negotiating settlements. The notice requirement also protects against stale claims.” By analogy and for the same reasons, we conclude there was no error in recognizing the duty in tenants to give notice of the asserted breach within a reasonable time.

B. Repair

The trial court properly instructed the jury that in order to establish a defense based on breach of the implied warranty of habitability, the landlord must be given a reasonable time to correct the defect while the tenant remains in possession. (See fn. 4.)

To maintain a cause of action for damages based on breach of implied warranty of habitability the landlord must be given a reasonable time to repair when the tenant remains in possession. (Hinson v. Delis, supra, 26 Cal.App.3d 62, 70; Quevedo v. Braga, supra, 72 Cal.App.3d Supp. 1, 8; see Pollard v. Saxe & Yolles Dev. Co., supra, 12 Cal.3d 374, 380.) The same rule should be followed when the breach is urged as a defense in unlawful detainer actions. As we have seen, the basis for permitting defense of breach of implied warranty in unlawful detainer actions is that the breach affects rent. The tenant’s statutory remedies to claim constructive eviction or use one month’s rent for repair are similarly conditioned on the landlord’s failure to repair within a reasonable time. (Civ. Code, § 1942.) There was no error in the instruction on reasonable time to repair.

C. Warranty

The trial court defined the implied warranty of habitability in the language used in Green, distinguishing between “‘bare living requirements’” on the one hand and “‘“amenities’”” and “aesthetically pleasing condition” on the other. The Green illustrations were also included. (10 Cal.3d at p. 637.) Appellants complain of the court’s rejection of lengthy instruction quoting the language of the eight subdivisions of Civil Code section 1941.1 and adding a number of other requirements to define habitable premises. The offered instruction among other things would require the landlord to keep clean every room and bathroom in the apartment house. Obviously, the implied warranty of habitability does not require the landlord to provide maid service to every tenant to clean up his room and bathroom. The trial court was not required to correct the offered instruction. (Shaw v. Pacific Greyhound Lines (1958) 50 Cal.2d 153, 158 [323 P.2d 391].)

D. Prior Condition

The trial court instructed the jury at the request of appellants that the issue in the case “is whether the owner breached the warranty of habitability at the time defendants were served with a three-day notice in June.” The court also read Civil Code section 823 to the jury which relates to remedies against assignees of landlord and tenant. It is claimed that the latter instruction conflicts with principles stated in Green and is confusing. However, Green did not declare the code section invalid and courts of course have no power to repeal or amend statutes. Because the instruction in its entirety was merely a quotation of the code section in its entirety, the instruction stated a valid principle of law, and it is not claimed that the statute was inapplicable. There was no error in the instruction. Had appellants wanted additional instructions explaining the applicability of the code section language to the issues of the instant case, they should have requested additional instructions. They did not request them.

The judgment should be affirmed. 
      
      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 importance 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.
     
      
      Rents for ocean view apartments were apparently doubled.
     
      
      Only one call was received. Appellant DeCaprio notified the owners of a broken window and leaky pipe. They were repaired.
     
      
      It was also pointed out that the current shortage of low and moderate rental housing has left tenants with little bargaining power. Enforcement of the implied warranty does not increase the supply of rental housing. If anything, the result will be that some landlords faced with substantial costs in complying with the warranty will tear down their buildings.
     
      
      The contention is directed to subdivision 2 of the following instruction: “In order to establish a defense to an action for unlawful detainer based on the defense of breach of the warranty of habitability, the tenant must establish the following elements: [11] 1. The existence of a materially defective condition affecting habitability and including common areas. [11] 2. The defective condition was unknown to the tenant at the time of the occupancy of his or her apartment. [H] 3. The effect on habitability of the defective condition was not apparent to the tenant upon a reasonable inspection. [II] 4. Notice was given the landlord within a reasonable time after the tenant discovered or should have discovered the breach of warranty. [II] 5. The landlord was given a reasonable time to correct the defect while the tenant remained in possession. [H] 6. Damages for breach of the implied warranty is [s/e] limited to the difference between the rent paid during the duration of the uninhabitable condition and the amount of rent which would have been reasonable taking into effect the amount the rental value was reduced because of the defects.”
      The instruction was given on the court’s own motion.
     
      
      We are not here concerned with tenant's right to claim constructive eviction or the right to use one month’s rent to repair. (Civ. Code, § 1942.)
     
      
      The jury could reasonably conclude that the complaints asserted by appellants did not meet the test of showing a denial of “bare living requirements” because the complaints were irrelevant to the test such as defective hinges on the refrigerator or were not of sufficient magnitude to meet the test such as the peeling paint.
     