Fire detection using ambient light sensor and IR filter

The value increases when detects the flame, I want the filter to only detect the flame emissions, because the environment light varies the value. Example: Normally the value is in ~100, and when the flame is close ~200. Now if I move it to a room with higher light, the average value will change, imagine more than 200, so the condition that value>200 to determine if there is the fire is invalid, having 200 as base, when the flame is there the value could be ~400. And I’m mean specifications for the IR filter.