Dear Customer (name blocked for privacy),
The angle of the social justice attorneys may be that of habitability since you are not yet in full compliance with all the laws. Some states would excuse the tenant from paying rent if the premises are uninhabitable.. However, the circumstances have to be really bad for this to apply. The standard is usually that of being reasonably suitable for human residence. Unless, whatever minor violations with the code deal is considered to be so bad that it would meet the criteria of being uninhabitable, then they may fail. It depends on what the statute says in regards to that. My Bar/Bri Materials note that the standard that is usually applied is the local housing code. However, since you served them with an eviction notice first, taking you to court under the Notice to Comply just seems like a bad idea. They may figure they can buy themselves a little more time from being evicted but it would seem that if you donot comply with the code and they shut down your building then the tenants are forced to move anyway.
You will need to check with a local attorney about this, but since they are taking you to court you possibly could file a countersuit for or under an unlawful detainer statute if one exists in California. They might call them something else there but it basically operates in the following way, These statutes provide for a quick hearing, but severely limit the issues that may be raised. Under most statutes, the only issue properly before the court is the landlord's right to rent and repossession. The tenant cannot raise counterclaims. Another words if you had filed suit first for their failure to pay rent and failure to move out, under such a statute they would lose because their failure to pay/and/or surrender possession to you would be the issue at the hearing. They likely could not raise any habitability issues.
Lastly, and prior to your court date, I would suggest you get a free consultation with an attorney and even if you have to pay for an hours worth of advice after that, it would be worth your time to do so. You can discuss with them the points I made above and see what your options are. That way, even if you are going to represent yourself, you will have all your ducks in a row before you go into court.
I hope that my sugeestions were helpful. Best of Luck to you. Please don't forget to click on the green accept button.:)
Sincerely,
JurisD7603