A shifter for controlling a transmission of a motor vehicle, the shifter comprising: a rotatably mounted actuation element; a sensor assembly comprising a first element having a plurality of binary sensors and a second element having a trigger device, wherein one of the first element and second element is rigidly coupled to the actuation element; a control unit for determining an angular position of the actuation element based on an input signal from the sensor assembly; wherein: the sensor assembly comprises at least three binary sensors, the binary sensors and the trigger device are arranged in such a way that each binary sensor corresponds to one trigger line of the trigger device, said trigger line comprises a plurality of trigger elements that are arranged to be individually detectable by said binary sensor, and the trigger elements are distributed along the trigger lines in such a way that at least one but not all of the binary sensors are able to detect the presence of a trigger element for each angular position of the actuation element, characterized in that at least one trigger element from each trigger line together form a trigger pattern, and said trigger pattern is repeated at least twice on the trigger device, preferably at least four times. a rotatably mounted actuation element; a sensor assembly comprising a first element having a plurality of binary sensors and a second element having a trigger device, wherein one of the first element and second element is rigidly coupled to the actuation element; a control unit for determining an angular position of the actuation element based on an input signal from the sensor assembly; wherein: the sensor assembly comprises at least three binary sensors, the binary sensors and the trigger device are arranged in such a way that each binary sensor corresponds to one trigger line of the trigger device, said trigger line comprises a plurality of trigger elements that are arranged to be individually detectable by said binary sensor, and the trigger elements are distributed along the trigger lines in such a way that at least one but not all of the binary sensors are able to detect the presence of a trigger element for each angular position of the actuation element, characterized in that at least one trigger element from each trigger line together form a trigger pattern, and said trigger pattern is repeated at least twice on the trigger device, preferably at least four times. the sensor assembly comprises at least three binary sensors, the binary sensors and the trigger device are arranged in such a way that each binary sensor corresponds to one trigger line of the trigger device, said trigger line comprises a plurality of trigger elements that are arranged to be individually detectable by said binary sensor, and the trigger elements are distributed along the trigger lines in such a way that at least one but not all of the binary sensors are able to detect the presence of a trigger element for each angular position of the actuation element, characterized in that at least one trigger element from each trigger line together form a trigger pattern, and said trigger pattern is repeated at least twice on the trigger device, preferably at least four times.