Controlling or determining the temperature of the motor or of the drive based on the temperature of a drive component or a semiconductor component