how many smoke detectors do i need in my house california law

In California, state law requires that smoke detectors be installed in every bedroom, in the hallway outside each bedroom area, and on every level of the home (including basements and attics that are used as living spaces). It is recommended to have a smoke detector in every bedroom and on every level of the home for optimal fire safety.