The  LEDs inside the photelectric smoke alarms are low power (less than a TV remote-control) and very little infrared escapes from the detector (because the detection chamber is shaped to exclude light, and is all black inside).