A lighting device comprising: a light source for emitting visible light; a sensor configured to detect infrared radiation from a plurality of locations along a path in a field of view of the sensor and to output a signal indicative of a presence of an occupant along said path; at least one attenuation element , arranged between at least one location of said plurality of locations and the sensor so as to attenuate or block infrared radiation emitted from said at least one location before it reaches the sensor, wherein the at least one attenuation element is further arranged in relation to the field of view for the signal output from the sensor to indicate, when an occupant is moving along the path, a direction of movement of the occupant along said path, a controller arranged to receive the signal output from the sensor and to control the light source based on said direction of movement of the occupant, a lens for directing infrared light towards the sensor, and a cover plate arranged between the at least one location of said plurality of locations and the sensor, and also arranged between the at least one location and the light source the lighting device being characterised in that : the cover plate is transparent or translucent to said visible light, the at least one attenuation element forms part of the lens and part of the cover plate, and outside, or away from, the attenuation element, the cover plate is at least partly transparent to infrared radiation. a light source for emitting visible light; a sensor configured to detect infrared radiation from a plurality of locations along a path in a field of view of the sensor and to output a signal indicative of a presence of an occupant along said path; at least one attenuation element , arranged between at least one location of said plurality of locations and the sensor so as to attenuate or block infrared radiation emitted from said at least one location before it reaches the sensor, wherein the at least one attenuation element is further arranged in relation to the field of view for the signal output from the sensor to indicate, when an occupant is moving along the path, a direction of movement of the occupant along said path, a controller arranged to receive the signal output from the sensor and to control the light source based on said direction of movement of the occupant, a lens for directing infrared light towards the sensor, and a cover plate arranged between the at least one location of said plurality of locations and the sensor, and also arranged between the at least one location and the light source the lighting device being characterised in that : the cover plate is transparent or translucent to said visible light, the at least one attenuation element forms part of the lens and part of the cover plate, and outside, or away from, the attenuation element, the cover plate is at least partly transparent to infrared radiation. the cover plate is transparent or translucent to said visible light, the at least one attenuation element forms part of the lens and part of the cover plate, and outside, or away from, the attenuation element, the cover plate is at least partly transparent to infrared radiation. <EOS>