The device (1) has two switching elements (4, 6) fixed to a holding frame (5) and a working device (2) of an agricultural distribution machine (3), respectively. A longitudinal axis of one of the switching elements is arranged parallel to a longitudinal axis of the other switching element. A switching unit is provided at the switching elements for detection of two switching conditions. A movement of the latter switching element relative to the former switching element is detected by an actuating device i.e. switch, that is attached to the latter switching element.