Demurrer challenges the contents of the complaint as to their legal sufficiency, and presumes the information alleged is true. W/o reviewing the complaint it isnt possible to say wheter there is a basis for a successful demurrer or not. It sounds like you have an affirmative defense to the action, and possibly another motion. if the place isnt a legal unit, have you left? You may have arguments about the rent that is allegedly due, but if you are going to defend on the place not being a legal unit, I think you have to give up possession. You should check with a tenants rights atty. in your area.
This question is difficult to answer since the content of the complaint is unknown. My best guess is that it is not the best way since the demurrer only addresses the content of the complaint and not the defenses raised. If the right discovery is propounded, a Motion for Summery Judgment might be the best way but most likely a trial will be held. The rental of an un-permitted unit is an illegal rental but you should immediately hire an attorney experienced in landlord/tenant law who can properly present the issues to a judge or jury.
Mr. Freitas is an attorney licensed in the State of California. The answer provided here is general information and not intended to be specific legal advice. There is not attorney client relationship created by Mr. Freitas' answering any question on this website.
Failure to comply with the City of Los Angeles' Rent Stabilization Ordinance (RSO) is an affirmative defense to an unlawful detainer. You must set forth the defense in your answer to the Unlawful Detainer. Demurrer are not permitted in Unlawful Detainer cases, but a motion to quash may test the sufficiency of the complaint, where the pleading defect affects personal jurisdiction. Parsons v. Superior Court, 149 Cal.App.4th Supp 1 at 5 (2007). Since any failure to comply with the RSO is probably a question of fact not appearing on the face of the complaint anyway, you may want to file a motion for summary judgment.