A device has a latching mechanism including a catch element having at least two catches, and a pawl configured to engage in a catch interstice between two catches. The catch element is movable in relation to the pawl in a freewheeling direction, and a movement of the catch element in relation to the pawl in a blocking direction may be blocked by means of the pawl. The device further includes a deflectable actuator configured to move the catch element and the pawl relative to each other on a catch-by-catch basis in the freewheeling direction by means of deflection. According to the invention, the device also includes an electric component configured to change its electric property as a function of the catch-wise movement of the catch element in relation to the pawl.