California Civil Code § 1954 codifies the rules a residential landlord must comply with upon entry of a residential unit. A landlord may enter a dwelling unit only in the following cases: (1) emergency; (2) to make necessary or agreed repairs or to inspect after reasonable notice pursuant to Section 1954(d); (3) when tenant has abandoned or surrendered the unit; or (4) pursuant to court order.
Failure to comply, i.e., an unlawful entry, may result in civil action including but not limited to, civil claims for invasion of privacy or breach of lease, and civil penalties per occurrence pursuant to Cal. Civ. Code § 1940.2.
Section 1954(d)(2) – Entry for purpose of exhibiting the dwelling unit to prospective or actual purchasers: In such a case, the notice may be given orally, in person or by telephone, if the landlord or an agent has notified the tenant in writing within 120 days of the oral notice that the property is for sale and that the landlord or agent may contact the tenant orally for the purpose of showing the unit or dwelling. Twenty-four hours is presumed reasonable notice in the absence of evidence to the contrary. The notice shall include the date, approximate time, and purpose of the entry. At the time of entry, the landlord or agent shall leave written evidence of the entry inside the unit.
Written notice is not always required if the landlord and tenant orally agree to an entry for repairs and date and approximate time of entry are part of that oral agreement. No notice is required if there is an emergency or the tenant is present and consents to the entry at the time of entry.