Device (1) and method for a vehicle (2) with a hydraulic actuation unit (3) for controlling the operation of an attachment (4) on the vehicle (2), comprising at least one position detection unit (7) with at least two in the direction of travel (6). of the vehicle (2) positioned one behind the other and directed towards the floor (5) distance determination sensors (8, 9) and an evaluation unit (10) with one of the hydraulic actuator (3) associated control unit (13), wherein the hydraulic actuator unit (3) a hoist (14) and a top link cylinder (18) for the attachment (4), which can be activated by the evaluation unit (10).