Fire detection using ambient light sensor and IR filter

With optical sensors, the threshold value you choose for "fire detection" will depend on the lighting conditions, no matter what else you do.

The usual way to get around that is to use multiple sensors and a more complex test for positive detection.

For example one sensor might measure the ambient light level and use that information to set the detection level for the output of the filtered-light sensor.