¶1 Landlord Lang Pham brought this unlawful detainer action against tenants Shakia Morgan and Shawn Corbett (Tenants). The Tenants counterclaimed for relocation assistance under RCW 59.18.085 and raised defenses of setoff and breach of implied warranty of habitability. The trial court found that Pham had breached the implied warranty and awarded damages and relocation assistance to the Tenants. Pham appeals, disputing the trial court’s findings of fact, the Tenants’ entitlement to damages, and their right to bring counterclaims in an unlawful detainer action. Finding no error, we affirm the decision of the trial court.
*822 FACTS
¶2 Lang Pham purchased the residential property located at 9312 51st Avenue South, Seattle, Washington (Property), at a foreclosure sale in March 2012. Pham owns and rents other apartment buildings. The Property was metered for five living units, so Pham had assumed it met regulatory requirements for use as a fiveplex. But the Property was permitted only for use as a triplex. Renting the building as a fiveplex violated city land use and building codes. Pham repainted, installed new carpet, and refinished the floors, but did not verify the building’s permit status before renting the five units. The permit information could easily have been accessed through the King County assessor and the website of the city of Seattle’s Department of Planning and Development (City).
¶3 On April 25, 2012, Pham and Shawn Corbett and Shakia Morgan entered into a one-year lease agreement for unit 5 (Unit) of the Property, for May 1, 2012 through April 30,2013. The Tenants were required to pay $850 rent on the first of each month. They paid the first and last month’s rent and a security deposit of $650, for a total of $2,350.
¶4 The tenancy presented a number of difficulties. The Tenants’ income varied, and they often paid their rent late or in installments. They complained to Pham about the Unit’s conditions, including the absence of baseboards; holes and gaps between the floor, walls, and doors; lack of railings on an outside deck and stairs, leaking water/ sewage in a large “crawl space”; and the stench of sewage coming from the bathroom sink. Pham characterized the Tenants’ complaints as “playing this game” and arising only when rent was due. Verbatim Report of Proceedings (VRP) at 64-65, 68. In contrast, the Tenants said that Pham would tell them to address the issues themselves or would fail to address their concerns at all.
¶5 In August 2012, the Tenants notified Pham that they had seen a rat in the Unit. Pham hired an exterminator to *823inspect and treat the Property for rodents and insects on a quarterly basis. The exterminator came twice to spray and set traps. Because the exterminator did not see evidence of rats, Pham discontinued the scheduled quarterly visits and opted for annual visits. The Tenants continued to see and hear rats in the Unit, and caught several rats using traps they purchased and placed themselves.
¶6 The Tenants had paid rent in full through April 2013, when the lease expired. The lease provided that the Tenants would be liable for rent and other damages sustained as a result of any holdover. The Tenants did not make any subsequent rent payments and were still in possession of the Unit at the time of trial in July 2013. Because the Tenants did not make payment or payment arrangements for May 2013, Pham testified that he posted and mailed a three-day pay or vacate notice on May 6, 2013, but the Tenants denied receiving it.
¶7 On May 10, 2013, the Tenants filed a complaint with the City regarding the Unit’s conditions. Five days later, city housing and zoning inspector Tom Bradrick inspected the Unit. Bradrick found that “the overall quality of the installation of the unit was very poor and would never have passed a building inspection at that time.. ..” VRP at 114.
¶8 On May 16, 2013, the day after the inspection, Pham served the Tenants with another three-day pay or vacate notice. The next day Bradrick mailed a notice of violation to Pham’s home address notifying him that the Property was not permitted for use as a fiveplex and that he needed to take corrective action by June 30, 2013.1 Pham testified that he did not receive this letter until May 22, 2013, five days later.
*824¶9 On Monday, May 20, 2013, Pham filed an unlawful detainer action to evict the Tenants because they failed to comply with the May 16, 2013 pay or vacate notice.
¶10 Bradrick sent a follow up letter on Wednesday, May 22,2013, notifying Pham that the Property must be brought into compliance or the City would require him to pay relocation assistance of $2,000.2 The letter also advised Pham that multiple repairs would be required before permitting the Unit, and that the sewage leak would need to be repaired immediately.
¶11 On June 6, 2013, Bradrick sent Pham a third letter listing specific repairs that needed to be done in order to obtain a permit and pass a housing inspection. These repairs included the sewage leak, the absence of a P-trap in the vanity drain under the bathroom sink, and the rodent access to the crawl space and bedroom closet. The letter again instructed Pham that if he did not make the necessary repairs, he would need to discontinue renting the Unit and pay $2,000 in relocation assistance. Pham hired an architect to work on permitting the Property for use as a fiveplex. At the time of trial, because Pham was still waiting to find out whether such use would be permittable, none of the other repairs had been made.
¶12 A bench trial was held on July 17, 2013. The parties presented testimony from five witnesses: Pham, Eric Bittenbender from Paratex Pest Control, Bradrick, Morgan, and Corbett. The trial court found that the Unit’s habitability had been reduced by 25 percent for the nine-month period in which the Tenants lived with the sewer and rodent issues. The trial court determined that the Tenants had *825overpaid rent for that period, but also that they owed rent because they remained in the Unit for two additional months without paying. The Tenants were awarded a net amount of $637.50 for the habitability claim, $2,550.00 in relocation assistance under RCW 59.18.085, and $650.00 for their security deposit. The trial court denied Pham’s motion for reconsideration and awarded attorney fees to the Tenants. Pham appeals.
DISCUSSION
¶13 “When a trial court has weighed the evidence in a bench trial, appellate review is limited to determining whether substantial evidence supports its findings of fact and, if so, whether the findings support the trial court’s conclusions of law. Substantial evidence exists when there is a sufficient quantity of evidence to persuade a fair-minded, rational person that a finding is true.” Hegwine v. Longview Fibre Co., 132 Wn. App. 546, 555-56, 132 P.3d 789 (2006) (citations omitted). A reviewing court begins with a presumption in favor of the trial court’s findings and the appellant has the burden of showing that a finding of fact is not supported by substantial evidence. Green v. Normandy Park Riviera Section Cmty. Club, Inc., 137 Wn. App. 665, 689, 151 P.3d 1038 (2007). Unchallenged findings are verities on appeal. Cowiche Canyon Conservancy v. Bosley, 118 Wn.2d 801, 808, 828 P.2d 549 (1992). Conclusions of law are reviewed de novo. Hegwine, 132 Wn. App. at 556 (citing Sunnyside Valley Irrig. Dist. v. Dickie, 149 Wn.2d 873, 880, 73 P.3d 369 (2003)).
Counterclaims in an Unlawful Detainer Action
¶14 Pham argues that the Tenants cannot bring counterclaims for relocation assistance and for damages for breach of implied warranty of habitability in an unlawful *826detainer proceeding.3 The Tenants argue that these claims are equitable defenses that directly relate to the issue of possession and, if proved, would excuse a breach of lease.
¶15 Pham correctly cites the rule that counterclaims are not allowed in unlawful detainer actions, except for those “ ‘based on facts that would excuse a tenant’s breach.’ ” Br. of Appellant at 19 (quoting Josephinium Assocs. v. Kahli, 111 Wn. App. 617, 625, 45 P.3d 627 (2002)). The exception properly applies when resolution of the counterclaim is “necessary to determine the right of possession.” First Union Mgmt., Inc. v. Slack, 36 Wn. App. 849, 854, 679 P.2d 936 (1984).
¶16 Under this exception, Washington courts have permitted counterclaims for breach of warranty of habitability and breach of the covenant of quiet enjoyment. See Foisy v. Wyman, 83 Wn.2d 22, 32, 515 P.2d 160 (1973); Income Props. Inv. Corp. v. Trefethen, 155 Wash. 493, 284 P. 782 (1930). The Foisy court approved of the affirmative defense of breach of warranty of habitability, because it “goes directly to the issue of rent due and owing, which is one of the basic issues in an unlawful detainer action. . . .” 83 Wn.2d at 31-32. Pham claims that the Foisy standard is “limited to the diminution in rental value” only, not claims for damages, but cites no authority for this argument. Br. of Appellant at 21. On the contrary, Foisy is often cited as the authority allowing counterclaims for damages for breach of the implied warranty of habitability. See Munden v. Hazelrigg, 105 Wn.2d 39, 45, 711 P.2d 295 (1985); Angelo Prop. Co. v. Hafiz, 167 Wn. App. 789, 811-12, 274 P.3d 1075 (2012); Heaverlo v. Keico Indus., Inc., 80 Wn. App. 724, 729, 911 P.2d 406 (1996). Furthermore, RCW 59.18.400 enables a tenant to “assert any legal or equitable defense or set-off arising out of the tenancy.” We reject Pham’s arguments and *827hold that the Tenants are permitted to raise the defense of breach of warranty of habitability in this action.
¶17 We also find that the Tenants’ claim for relocation assistance was properly raised in this action. An unlawful detainer action is a limited statutory proceeding to resolve the right to possession between the landlord and the tenant. Ch. 59.12 RCW; Munden, 105 Wn.2d at 45. The law draws a distinction between possession and the right of possession. Kessler v. Nielsen, 3 Wn. App. 120, 126, 472 P.2d 616 (1970). Once an unlawful detainer action is commenced and the defendant does not concede the right to possession, he or she has the right to have the issue determined. Hous. Auth. v. Pleasant, 126 Wn. App. 382, 389, 109 P.3d 422 (2005).
¶18 Pham argues that the trial court “fail[ed] to explain how relocation assistance relates to possession of the property.” Br. of Appellant at 21. And he claims it is contradictory for a tenant to ask for assistance to vacate while he or she continues to assert a right to possession. We disagree. By seeking relocation assistance, the Tenants do not concede the right to possession. Instead, they claim the right has been compromised by the Unit’s unlawful status, which, in turn, gives rise to the claim for relocation assistance. Thus, the issue of the right to possession is intimately tied to the lawful status of the Unit and the Tenants’ right to relocation assistance. Furthermore, the relocation assistance claim is also based on facts that would excuse a tenant’s breach, because it requires a finding that the dwelling is or will be unlawful to occupy. A landlord would be precluded from renting a dwelling that was illegal to occupy, and any tenants would be absolved of their duty to pay rent.4
*828¶19 The Tenants also argue that excluding relocation assistance claims from unlawful detainer proceedings would undermine the goals of the statute. We find this argument persuasive. The legislature’s stated purpose when it enacted RCW 59.18.085 was to prevent tenants from being forced to “remain [ ] in rental housing that does not meet the state’s minimum standards for health and safety because they cannot afford to pay the costs of relocation in advance of occupying new, safe, and habitable housing.” Laws of 2005, ch. 364, § 1. Requiring displaced tenants to bring separate actions for relocation assistance on the regular civil calendar would impose unnecessary delay and costs on top of the financial burdens involved in the moving process. In accordance with the statute’s purpose, we hold that an unlawful detainer action is an appropriate forum for relocation assistance claims under RCW 59.18.085.
Implied Warranty of Habitability
¶20 Pham claims that the trial court’s finding of breach of the implied warranty of habitability is not supported by substantial evidence. He argues that the sewer leak did not present a habitability issue or, if it did, he was not notified or given opportunity to cure. He also argues that there was no evidence of a rodent infestation. The Tenants argue that the record contains sufficient evidence to show that Pham breached the implied warrant of habitability.
¶21 In a residential unlawful detainer action, a tenant may raise a defense based on a landlord’s breach of the implied warranty of habitability. Foisy, 83 Wn.2d at 32. *829For a breach of this warranty, the trier of fact must find “(1) [w]hether the evidence indicates that the premises were totally or partially uninhabitable during the period of habitation and, if so, (2) what portion, if any or all, of the defendant’s obligation to pay rent is relieved by the landlord’s total or partial breach of his implied warranty of habitability.” Id. at 34. A warranty’s applicability is a mixed question of law and fact. Burbo v. Harley C. Douglass, Inc., 125 Wn. App. 684, 694, 106 P.3d 258 (2005). Conditions that “present a substantial risk of future danger” will give rise to a claim for breach of warranty of habitability. Westlake View Condo. Ass’n v. Sixth Ave. View Partners, LLC, 146 Wn. App. 760, 771, 193 P.3d 161 (2008).
¶22 The record contains ample evidence of conditions in the Unit that would cause a fair-minded, rational person to find a substantial risk of future danger. As long as substantial evidence supports the trial court’s findings, “a reviewing court will not substitute its judgment for that of the trial court even though it might have resolved a factual dispute differently.” Sunnyside, 149 Wn.2d at 879-80. Pham misstates the evidence when he claims that Bradrick testified that “the habitability issues were not so egregious as to warrant an order of condemnation, eviction or displacement, even though he had authority to issue such orders.” Appellant’s Reply Br. at 11. Bradrick testified that he did not consider the sewer leak to be “egregious to the point where I was going to get excited and create an emergency on it or anything, but I did want it to be addressed relatively quickly.” VRP at 115. He further testified that “[i]f I went back to inspect today, and the sewage had not been rectified, I would immediately put out an emergency order, yes.” VRP at 132. The Tenants also testified about the sewage leak and smell and presented evidence that Pham had been informed that the lines needed to be replaced. The Tenants’ testimony about the persistence of rodents as well as Bradrick’s testimony and letter all supported a likelihood that rodents were present. Bradrick also testified about the *830poor condition and installation of the stairs and handrails, back door, sewer pipe, door to the crawl space, and bathroom sink, and dangerous electrical violations. We find that the record contains sufficient evidence to support a finding of breach of the warranty of habitability.
¶23 Pham argues the Tenants failed to provide him with notice and opportunity to cure any defects as required by RCW 59.18.070. Br. of Appellant at 11. The argument is without merit. The record shows that Pham had ample notice of the defects and an opportunity to cure them. In addition to the complaints from the Tenants, Pham received at least three letters from Bradrick advising him of the defects. Pham presented no evidence that to the extent he acted in response to these complaints, the defects were ever cured.
¶24 Pham argues that the trial court applied the wrong standard when it found him in breach of the implied warranty of habitability. He contends the trial court erroneously required him to take “ ‘all reasonable measures’ ” to ensure that the unit was rodent-free because the Tenants had a small child. Br. of Appellant at 12-13. In support of this argument Pham points to the court’s oral ruling, in which, quoting Landis & Landis Construction, LLC v. Nation, 171 Wn. App. 157, 166, 286 P.3d 979 (2012), it stated that “ ‘[t]here is no doubt that a rodent infestation can create an actual or potential safety hazard’ ” and that this was “especially true where, as here, an infant is in the home.” Clerk’s Papers (CP) at 85. The trial court also stated that Pham “had a responsibility to take all reasonable measures to keep rats from the unit, which he failed to do.” Id. But the trial court’s written findings show that its conclusion was based on the totality of the circumstances, including the sewage leak, the rats, the odors, the faulty handrails, the holes in the floor, and Pham’s failure to remedy any of the conditions.5 A written order controls over any apparent inconsistency with the court’s earlier oral *831ruling. Shellenbarger v. Brigman, 101 Wn. App. 339, 346, 3 P.3d 211 (2000). Accordingly, we reject Pham’s argument that the trial court relied on an improper standard of habitability when it concluded that he breached the implied warranty of habitability.
Award of Relocation Assistance
¶25 Pham argues that the trial court erred in finding that the Tenants were entitled to relocation assistance under RCW 59.18.085(3). Pham’s first argument is one of statutory interpretation. He argues that the Tenants are not entitled to relocation assistance because the City never issued a “notice of condemnation, eviction or displacement order.” Br. of Appellant at 17. The Tenants argue that an order is not required because the obligation to provide relocation assistance arose when Pham was notified that the dwelling was unlawful.
¶26 This court reviews questions of statutory interpretation de novo. State v. Wentz, 149 Wn.2d 342, 346, 68 P.3d 282 (2003). In interpreting statutes, we strive to discern and implement the legislature’s intent. State v. J.P., 149 Wn.2d 444, 450, 69 P.3d 318 (2003). Where the plain language of a statute is unambiguous and “the legislative intent is apparent . . . we will not construe the statute otherwise.” Id. (citing State v. Wilson, 125 Wn.2d 212, 217, 883 P.2d 320 (1994)). Plain meaning, however, may be gleaned “from all that the Legislature has said in the statute and related statutes which disclose legislative intent about the provision in question.” Dep’t of Ecology v. Campbell & Gwinn, LLC, 146 Wn.2d 1, 11, 43 P.3d 4 (2002).
¶27 Pham bases his argument on RCW 59.18-.085(3)(c)’s reference to a “notice of the condemnation, evic*832tion, or displacement order.”6 Amicus King County Bar Association (KCBA) argues that the obligation to pay relocation assistance under .subsection (3)(a) does not require that a unit actually be condemned or unlawful to occupy. It is enough for an agency to notify a landlord that the dwelling will be condemned or will be unlawful to occupy.
¶28 We agree with the Tenants and KCBA. The plain language of RCW 59.18.085(3) supports this interpretation. Subsection (3)(a) applies when a landlord has been notified that the dwelling will be condemned or unlawful to occupy due to conditions that violate applicable codes, statutes, ordinances, or regulations. At that point, a landlord who knew or should have known of the conditions shall be required to pay relocation assistance, unless the conditions are a result of illegal activity, natural disaster, or acquisition by eminent domain. RCW 59.18.085(3)(a)(i)-(iii).
¶29 If a landlord refuses to pay relocation assistance under RCW 59.18.085(3)(a) and the governing agency is forced to condemn the dwelling, then the enforcement mechanisms in subsections (3)(c), (f), (g), and (h) come into play. At that point the landlord must pay the required relocation assistance within 7 days of receiving notice of the condemnation, eviction, or displacement order. If a landlord does not pay within that period, the governing agency may advance payment to the tenants and seek to recover from the landlord, with interest. The governing agency is entitled to its fees and costs and the landlord may face civil penalties if more than 60 days have passed.
¶30 Pham argues that “the legislative history” supports his interpretation and at oral argument cited RCW 59.18-.085 notes. But the notes, titled “Purpose,” are consistent with our reading of the statute’s plain language. The notes read:
*833Certain tenants in the state of Washington have remained in rental housing that does not meet the state’s minimum standards for health and safety because they cannot afford to pay the costs of relocation in advance of occupying new, safe, and habitable housing. In egregious cases, authorities have been forced to condemn property when landlords have failed to remedy building code or health code violations after repeated notice, and, as a result, families with limited financial resources have been displaced and left with nowhere to go.
Subsection (3)(a) addresses the first issue of tenants being forced to stay in substandard housing by requiring landlords to pay relocation assistance. Subsections (3)(c), (f), (g), and (h) were enacted for the “egregious cases” where a landlord has notice and has refused to pay relocation assistance, and a governing authority is forced to condemn the property.
¶31 Based on the language of the statute, we find that if RCW 59.18.085(3)(a) applies, a landlord is required to pay relocation assistance if the building will be condemned or deemed unlawful to occupy. In this circumstance, it is irrelevant whether the landlord has received notice of an order of condemnation, eviction, or displacement.
¶32 Pham next argues that he was never notified that the unit will “be condemned” or will “be unlawful to occupy.” Br. of Appellant at 17. The Tenants argue that Pham received three letters informing him that the units were illegal. The record shows that Pham received notice that the dwelling was unlawful to occupy because (1) it was permitted only for use as a triplex and (2) its condition was substandard and violated multiple provisions of the housing code. The initial notice of violation states that Pham must
DISCONTINUE THE MAINTENANCE/USE OF 9312 51st AVE SOUTH AS A FIVEPLEX OR OBTAIN A PERMIT AND FINAL APPROVAL INSPECTION TO ESTABLISH THE USE. A FIVEPLEX IS NOT THE LEGALLY ESTABLISHED USE OF THE PROPERTY; THE CURRENT PERMITTED USE OF THIS PROPERTY IS AS A TRIPLEX.
*834CP at 69. The second letter reads, “The units will have to be legalized, under a permit, or the tenants removed (you will have to pay them $2000 for tenant relocation assistance) and the units shut down and never rented again until they are legalized” and “multiple repairs will be needed to the lower unit if it is to be permitted.” CP at 76. The final letter, dated June 6, 2013, indicated that there were numerous housing violations that would need to be addressed before the building would be legal to rent. Pham’s contention that the City did not notify him that the dwelling “is unlawful to occupy” is contradicted by the explicit text of the notice and letters. Br. of Appellant at 17.
¶33 Third, Pham argues that the statute and the Residential Landlord-Tenant Act of 1973 (RLTA), ch. 59.18 RCW, provide him with opportunity to cure before being required to pay relocation assistance. The Tenants argue that there is no cure period and to infer one would defeat the statute’s purpose, because landlords would take advantage of such period and delay taking any action until forced to do so.
¶34 We find that there is no safe harbor for landlords once they have been notified that the dwelling will be condemned or will be unlawful to occupy, even if they are in the process of permitting.7 The statute inherently requires notice before the violation is issued because it applies only to landlords who “knew or should have known” about the conditions. RCW 59.18.085(3)(a). There is no additional opportunity to cure, and to impose one would allow landlords to delay the process and continue to rent unlawful dwellings without penalty.
*835¶35 Pham argues that the statute must contain an additional implicit notice requirement and cure period because RCW 59.18.085 notes indicate that a landlord is to receive “due notice.” Laws of 2005, ch. 364, § 1. The notes read, “The purpose of this act is to establish a process by which displaced tenants would receive funds for relocation from landlords who fail to provide safe and sanitary housing after due notice of building code or health code violations.” Id. Again, the legislature already provided for “due notice” by requiring a “governmental agency responsible for the enforcement of a building, housing, or other appropriate code” to “notif [y] the landlord that a dwelling” is or will be “condemned” or “unlawful to occupy” before imposing a duty to provide relocation assistance. RCW 59.18.085(1), (3)(a).
¶36 According to Pham, the City’s letter also gives him opportunity to cure. He claims he is not required to pay relocation assistance because the City gave him the option and he chose to permit the unit. The Seattle Municipal Code (SMC) imposes its own requirements for payment of relocation assistance upon the issuance of an emergency order to vacate. SMC 22.206.260(F). The City’s procedures do not affect the Tenants’ rights or a landlord’s obligations under the RLTA. Nothing in the SMC “is intended to affect or limit a tenant’s right to pursue a private right of action pursuant to Chapter 59.18 RCW for any violation of Chapter 59.18 RCW for which that chapter provides a private right of action.” SMC 22.206.305. Moreover, even if Pham had obtained the permits, the Unit was still unlawful to occupy because of the multiple violations of the housing code that had not been remedied.
¶37 Pham makes several additional perfunctory arguments against the Tenants’ entitlement to relocation costs. We reject each of them. Pham’s claim that substantial evidence did not support the trial court’s finding that the building was unlawful to occupy is meritless. The explicit language in the City’s letters demonstrate otherwise. Pham’s argument that the statute does not allow assistance *836to be paid to tenants who choose to relocate is simply incorrect. RCW 59.18.085(3) does not address a tenant’s choice to relocate, but subsection (2) specifically allows a tenant who “elects to terminate the tenancy as a result of the conditions leading to the posting” to recover additional damages if a landlord knowingly violates subsection (1). The trial court stated that the tenants “elected to be relocated” but found that Pham had to pay only relocation assistance under RCW 59.18.085(3)(a). CP at 88. Thus, the trial court’s comment is of no consequence to the Tenants’ entitlement to relocation assistance. Even if the tenants had chosen to relocate, it would not negate the mandatory payment required by subsection (3)(a).
¶38 Pham also argues that a tenant can sue under RCW 59.18.085(3)(e) only if relocation assistance has been ordered and the landlord fails to pay. The Tenants argue that subsection (3)(e) creates a private right of action against a landlord, independent of governmental enforcement. We agree with the Tenants and find that subsection (3)(e) allows a tenant to bring a private action to recover relocation assistance due under subsection (3)(a). The text of subsection (3)(e) distinguishes the governmental enforcement and the private right by allowing attorney fees and costs to be awarded for actions brought under subsections (3)(e) or (3)(c).
¶39 Finally, Pham argues that the trial court was required to find that he brought the eviction to avoid paying relocation assistance.8 Appellant’s Reply Br. at 6. This is not correct. RCW 59.18.085(3)(a) requires payment of relocation assistance regardless of whether any retaliatory action has been taken against the tenants.
*837 Tenants’ Default
¶40 Pham argues that the trial court wrongfully applied the Tenants’ last month’s rent to bring them out of default. He claims that in order to apply the last month’s rent, the Tenants had to (1) give 20 days’ notice of intent to vacate, (2) indicate that they wanted to apply the last month’s rent to that final month, and (3) actually vacate. Br. of Appellant at 14. The Tenants claim that they are entitled to apply the prepaid last months’ rent as an offset for any amount due and owing.
¶41 We find no error in the trial court’s assessment. Pham received a month’s worth of prepaid rent from the Tenants. The lease does not contain any provisions specifying how this prepaid rent will be applied or any conditions that must be met before it may be credited. Again, under RCW 59.18.400, a defendant in an unlawful detainer action “may assert any legal or equitable defense or set-off arising out of the tenancy.” The Tenants raised the defense that they were current in rent because they prepaid the last month’s rent. The trial court appropriately applied the prepayment as an offset and found that the Tenants prevailed on their defense that no rent is due and owing.
¶42 Pham argues that the Tenants were barred by RCW 59.18.080 from exercising remedies under the RLTA because they were not current in rent. The Tenants argue that they can exercise RLTA remedies because RCW 59.18.080 does not limit the right to raise a defense that there is no rent due and owing.9
¶43 RCW 59.18.080 requires a tenant to “be current in the payment of rent including all utilities . . . before *838exercising any of the remedies accorded him or her under the provisions of this chapter . . . PROVIDED FURTHER, That this section shall not be construed as limiting the tenant’s right in an unlawful detainer proceeding to raise the defense that there is no rent due and owing.” As discussed earlier, the Tenants raised the defenses that they did not owe any rent due to their claims of setoff and breach of warranty of habitability. The trial court found that they prevailed on those claims and that they were current in the payment of rent.
¶44 Pham also argues that the tenants had not proved any diminution in value for the alleged defects in the premises. According to him, the trial court’s conclusion that the premises were 25 percent uninhabitable was not supported by evidence and, even if it were, the Tenants are still required to tender rent for the diminished value. We disagree. First, the Tenants have already paid full rent for the entire lease term, and rent for May 2013 was prepaid. The trial court also required the Tenants to tender rent for June and July 2013 and calculated that amount into the offset, even though the Unit had been deemed illegal to inhabit at that time.10 Second, there is substantial evidence in the record to support a finding of significantly reduced habitability as a result of the sewer leak, the rodent problem, the structural defects, the electrical violations, and the “very poor” overall quality of the Unit’s installation. VRP at 114. At trial, the Tenants proposed a percentage of 25 based on an estimate of the percentage of actual uninhabitable space in the Unit. This included “the pantry area, any areas where there were rats . . . [or] sewage smell.” VRP at 217. Pham accepted the estimate at that time but later disputed it in his motion for reconsideration. From the record, a rational, *839fair-minded person could easily find that the Unit’s habitability had been reduced by 25 percent.
¶45 Pham argues that the trial court should have found that the terms of the lease agreement continued to apply after the lease expired. He claims he should have been allowed to charge late fees for the months that the Tenants held over and failed to pay rent. The Tenants claim that they were not subject to late fees because they were not late — they had already overpaid based on the unit’s condition.
¶46 The relevant portion of the trial court’s finding reads:
As Plaintiff acknowledges, late fees are a provision of the lease that expired April 30, 2013, and Defendants paid rent through that date. No evidence was offered to suggest the parties orally agreed that the lease terms continue into a month-to-month tenancy. Accordingly, Plaintiff’s claim for late fees has no legal basis. For the reasons stated below, the Court finds that Defendants are excused from payment of rent after expiration of the lease. . . .
CP at 84-85. The lease states, “If any rent is not paid on or before the due date, Tenant agrees to pay a late charge of [$]25 for each day that the same is delinquent, including the day of payment . . . .” CP at 56. Pham correctly cites the general rule that the terms of a fixed lease apply to the terms of a holdover tenancy, even in the absence of language in a holdover provision. Marsh-McLennan Bldg., Inc. v. Clapp, 96 Wn. App. 636, 644-48, 980 P.2d 311 (1999). Under this rule, the terms of the lease would have extended to the holdover tenancy and Pham would have been entitled to charge late fees if the Tenants had been in default.11
¶47 We find that the terms of the lease apply to the holdover tenancy. However, we agree with the trial court’s *840assessment that Pham’s claim for late fees “has no legal basis” because the Tenants were found to be current in rent. CP at 84. An appellate court may “sustain a trial court’s judgment upon any theory established by the pleadings and supported by proof.” Wendle v. Farrow, 102 Wn.2d 380, 382, 686 P.2d 480 (1984) (citing Gross v. City of Lynnwood, 90 Wn.2d 395, 401, 583 P.2d 1197 (1978)). Based on Pham’s breach of the warranty of habitability, the trial court concluded that as of April 2013, the Tenants had overpaid rent for nine months, and that overpayment had already covered the rent due for May, June, and July 2013. Therefore, at the time of trial, there was no rent that had “not [been] paid on or before the due date.” CP at 56.
¶48 The Tenants request an award of attorney fees as the prevailing party on appeal. Under RCW 59.18.290 and RAP 18.1, the Tenants are entitled to an award of reasonable attorney fees and costs on appeal.
¶49 Affirmed.
Becker and Lau, JJ., concur.Under the Seattle Municipal Code (SMC), the City has the authority to issue a notice of violation that identifies each violation of the standards and requirements of the code and the corrective action necessary to bring the building into compliance. SMC 22.206.220(A)(1). The notice of violation must also specify a time for compliance. SMC 22.206.220(A)(2).
Under SMC 22.206.260(A), whenever a building, housing unit, or premises has been found to be “an imminent threat to the health or safety of the occupants or the public, an emergency order may be issued directing that the building, housing unit or premises be restored to a condition of safety and specifying the time for compliance. In the alternative, the order may require that the building, housing unit or premises be immediately vacated and closed to entry.” Subsection (F)(1) requires relocation assistance to be paid to “[a]ny tenant who is required to vacate and actually vacates a housing unit as a result of an emergency order.”
Pham also argues that the Tenants are not entitled to a monetary award because they failed to pay the required filing fee for a counterclaim or obtain a waiver. But because he cites no authority for the argument, we decline to consider it.
Even if Pham were correct that a relocation assistance claim did not relate to possession, there is no reason why the trial court could not have resolved the question of possession and then converted the unlawful detainer action to a civil action at that time. This would have permitted the trial court to address the relocation assistance claim in the same proceeding while preserving the special *828nature of the unlawful detainer action. Where the right to possession ceases to be at issue at any time between the commencement of an unlawful detainer action and trial of that action, the proceeding may be converted into an ordinary civil suit for damages. Munden, 105 Wn.2d at 45-46. Despite Pham’s contention at oral argument that this is “not the law,” a trial court has “inherent power to fashion the method by which an unlawful detainer action is converted to an ordinary civil action.” Id. at 47. Once the case has been converted, the trial court’s general jurisdiction is restored and it can hear claims between the parties that were excluded from the unlawful detainer action. Id. at 45-46.
Pham also argues that the trial court erred in finding that he breached the duty imposed by the implied warranty of habitability, because the duty requires *831nothing more than for a landlord to act with “reasonable diligence to eliminate dangers that pose an actual or potential safety hazard to its occupants.” Br. of Appellant at 12. He contends, “There is no breach if the landlord’s efforts are reasonable but unsuccessful.” Id. But the case Pham cites, Lian v. Stalick, 106 Wn. App. 811, 818, 25 P.3d 467 (2001), supports neither proposition. Nowhere in Lian does the court suggest that a finding of breach is precluded if a landlord merely takes reasonable measures to cure.
RCW 59.18.085(3)(a)(i)-(ii) also refer to a “condemnation or no occupancy-order.” These are the exceptions under which a landlord will not be required to pay relocation assistance, and neither apply here.
At oral argument, Pham claimed that without additional notice and opportunity to cure, the statute as written would open the floodgates for relocation assistance claims because tenants would be able to sit idly in substandard conditions and notify their landlords only when they were facing eviction. Again, the statute requires that a landlord be notified that a building is unlawful to occupy and to have actual or constructive knowledge of the conditions giving rise to the illegal status before requiring them to pay relocation assistance.
Subsection (3)(d) prevents a landlord from taking retaliatory or collateral action against tenants after receiving a notice of violation. This does not have any effect on a landlord’s duty to pay relocation assistance under subsection (3)(a).
Alternatively, the Tenants argue that the statute does not limit the tenant’s “civil remedies for negligent or intentional damages” and that the standards required for relocation assistance should qualify as a civil remedy for negligent or intentional damages. Given our disposition of this case, we do not address this argument.
The trial court in its discretion awarded Pham rent for that period because the Tenants were still in possession. We note, however, that Pham’s entitlement to rent during that time is questionable given his knowledge that the Unit was unlawful to occupy. Nonetheless, because the Tenants did not appeal the issue, we will not disturb that award.
This assumes that the building would have been lawful to occupy. It was not lawful to occupy during the time that Pham argues that he is entitled to charge late fees.