Controlling or determining the motor or drive temperature