A device (10), which is for holding a transport unit (W) that moves in a transport direction (T), includes an actuator (16) equipped with a drive unit (16c/16d) and an actuating element (16a), which, in an extended position, can be brought directly or indirectly into a holding engagement with the transport unit (W); a sensor unit (22) that is situated before the actuator (16) and a sensor unit (24) that is situated after the actuator (16), both of which are for detecting the presence of a transport unit (W); and a control unit (28) for receiving the detection results of the transport unit sensor units (22, 24) and controlling the actuator (16), wherein the two sensor units (22, 24), the control unit (28), and at least the drive unit (16c/16d) of the actuator (16) are integrated into a shared housing (12).