Sounds like you might have a potential claim and should speak to an attorney. See http://law.onecle.com/california/civil/1942.3.html. Was the landlord in writing requested to fix the heater? If so, you need to wait 35 days before filing the lawsuit.
In the alternative to suing the landlord, you can give a written notice of your intention to move out. Especially after being cited, the landlord will have difficulty successfully arguing that you have to continue living there for the duration of the lease.
You can sue your landlord for breach of the implied warranty of habitability. Your landlord has an absolute statutory duty to provide hot water and heat. (Civil Code section 1941.1.) Call your county Health Department, and ask them to come over and inspect and order the landlord to make these essential repairs. The Health Department *should* order the landlord to restore heat and hot water within two days.
Nevertheless, you have a lawsuit now for the rent you've paid your landlord to live without these essential utilities, and for retaliatory threat of eviction.
Important things to remember: 1. The fact that I answered a question that you asked me on line, doesn't make me your lawyer. 2. Opinions are like noses--everyone has one. I just happen to think my opinions are right, but check with another lawyer too.
Zack is right, there is a potential claim here. Code Enforcement will give your landlord 20 to 30 days to resolve the heater issue. You could also write you landlord a letter explaining your lack of heat, the citation, and your intent to make the needed repairs yourself and then deduct them from January's rent. Me, I'd get a space heater and take Zack's advice.
A proper response would require a thorough investigation into the history and background of this relationship. The information provided above is just that, information, to be used as you see fit.