An assembly for a drug delivery device (200) is provided, the assembly comprising a needle mounting feature (1), a needle detector (2), a housing (3) and a movable feature (4) which is movably connected to the housing (3) and movable with respect thereto between a first position and a second position different from the first position. The needle detector (2) is configured to detect whether a needle (101) is mounted to the needle mounting feature (1). The assembly is further configured such that when a needle (101) is mounted to the needle mounting feature (1), the movable feature (4) is in the second position and when the needle (101) is not mounted to the needle mounting feature (1), the movable feature (4) is in the first position.