Smoke alarms (or smoke detectors) are devices that detect smoke and sound an alarm to warn occupants of potential fire, providing critical early warning that saves lives. Provincial fire codes and building codes require smoke alarms in all dwellings, typically on every storey and near sleeping areas. Alarms may be battery-powered, hardwired to electrical systems, or interconnected so that activation of one triggers all alarms in the building. Ionization alarms respond quickly to flaming fires while photoelectric alarms better detect smouldering fires—combination units provide both technologies. Property owners are responsible for installing and maintaining required alarms. Fire departments often provide public education about smoke alarm importance and proper maintenance including regular testing and battery replacement.