Q: Do you have to have smoke detectors in emergency electrical rooms or electrical rooms?
A: In a hospital? Only if you have an FSES equivalency that requires it, or the room is located inside an area under Specialized Protective Measure locks as described in section 22.214.171.124.5.2 of the 2012 LSC. Otherwise, there are no NFPA codes or standards that require it. But check with your state and local authorities to see if they have regulations that require it.
Often times smoke detectors are placed in locations based on designer preference.