A device capable of registering a specific substance or physical phenomenon, and that optionally sounds an alarm or triggers a warning.
Smoke detectors are mandatory in public buildings.