You need to show you are trying to re-rent
https://www.nolo.com/legal-encyclopedia/tenants-right-break-rental-lease-california.html
If you don’t have a legal justification to break your lease, the good news is that you may still be off the hook for paying all the rent due for the remaining lease term. This is because under California law (Cal. Civ. Code § 1951.2), your landlord must make reasonable efforts to re-rent your unit—no matter what your reason for leaving—rather than charge you for the total remaining rent due under the lease. So you may not have to pay much, if any additional rent, if you break your lease. You need pay only the amount of rent the landlord loses because you moved out early. This is because California requires landlords to take reasonable steps to keep their losses to a minimum—or to “mitigate damages” in legal terms.