Yes, a bad throttle sensor can affect the idle and result in a rough or unstable idle. If you suspect that the throttle position sensor is bad, you need to scan the trouble code memory with a code scanner.