PIR Sensor Question

But reading an analogue input (mostly) doesn't return HIGH (1) or LOW (0), but some value in the range 0...1023, depending on the voltage on the pin.

The "pinMode(SENSOR, INPUT);" does absolutely nothing to help you; it is setting the mode of digital input 2.