Sorry, but we are not qualified to give legal advice. You have tenant rights, these are tempered as to whether you caused the problem or they just happened as part of the property condition.
In either case, California offers free legal advice. If you go down to the county courthouse there is a legal center that can help answer these questions for you. If the home is 'red tagged' as being uninhabitable, and not by your actions, you may be eligible for the property owner to pay for your housing somewhere else until the home is corrected. ....but all of that is dependent on lots of factors.
It's best to talk to an attorney. If you don't want to go down to the county courthouse, sign up for Legal Shield. Those are the two most affordable legal options that you have.