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.1 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.2
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 *61hinges, 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.
*62A 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.)3
*63Relying 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 *64implied warranty, it must appear the tenant did not have knowledge of the condition at the time of occupancy.4
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 *65from 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 *66be 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 *67future, 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.5
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.6 (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 *68things 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.
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 *63not 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.