(f)
(1) Within a reasonable time after notification of either party's intention to terminate the tenancy, or before the end of the lease term, the landlord shall notify the tenant in writing of his or her option to request an initial inspection and of his or her right to be present at the inspection. The requirements of this subdivision do not apply when the tenancy is terminated pursuant to subdivision (2), (3), or (4) of Section 1161 of the Code of Civil Procedure. At a reasonable time, but no earlier than two weeks before the termination or the end of lease date, the landlord, or an agent of the landlord, shall, upon the request of the tenant, make an initial inspection of the premises prior to any final inspection the landlord makes after the tenant has vacated the premises. The purpose of the initial inspection shall be to allow the tenant an opportunity to remedy identified deficiencies, in a manner consistent with the rights and obligations of the parties under the rental agreement, in order to avoid deductions from the security. If a tenant chooses not to request an initial inspection, the duties of the landlord under this subdivision are discharged. If an inspection is requested, the parties shall attempt to schedule the inspection at a mutually acceptable date and time. The landlord shall give at least 48 hours' prior written notice of the date and time of the inspection if either a mutual time is agreed upon, or if a mutually agreed time cannot be scheduled but the tenant still wishes an inspection. The tenant and landlord may agree to forgo the 48-hour prior written notice by both signing a written waiver. The landlord shall proceed with the inspection whether the tenant is present or not, unless the tenant previously withdrew his or her request for the inspection.
(2) Based on the inspection, the landlord shall give the tenant an itemized statement specifying repairs or cleaning that are proposed to be the basis of any deductions from the security the landlord intends to make pursuant to paragraphs (1) to (4), inclusive of subdivision (b). This statement shall also include the texts of paragraphs (1) to (4), inclusive, of subdivision (b). The statement shall be given to the tenant, if the tenant is present for the inspection, or shall be left inside the premises.
(3) The tenant shall have the opportunity during the period following the initial inspection until termination of the tenancy to remedy identified deficiencies, in a manner consistent with the rights and obligations of the parties under the rental agreement, in order to avoid deductions from the security.
(4) Nothing in this subdivision shall prevent a landlord from using the security for deductions itemized in the statement provided for in paragraph (2) that were not cured by the tenant so long as the deductions are for damages authorized by this section.
(5) Nothing in this subdivision shall prevent a landlord from using the security for any purpose specified in paragraphs (1) to (4), inclusive, of subdivision (b) that occurs between completion of the initial inspection and termination of the tenancy or was not identified during the initial inspection due to the presence of a tenant's possessions.