The invention relates to an electric device. The electric device has a housing, at least one printed circuit board, and at least one heat sink. The housing encloses a cavity, and the printed circuit board is received in the cavity. The printed circuit board is connected to the heat sink so as to conduct heat. According to the invention, the housing has a housing cover, and the housing cover has at least one, two, or three pressing elements, in particular pressing bolts or pressing pins, which are mounted in a movable manner along the longitudinal axis transversely to an areal extension of the housing cover. The pressing element is designed to be inserted into the cavity and to be pressed against the printed circuit board directly or at least indirectly and thus press the printed circuit board against the heat sink.