Smoke Alarm and Electrical Boxes

Is there currently a code that requires electrical boxes to be installed for hardwire detectors? If so, could you cite that for me?

Thanks! :slight_smile: