I'm know this topic has been covered thousands of times but I can't find a good explanation to what I'm looking at. I am putting in a basement bathroom, I'm wiring it now on a 20 Amp circuit per code, and today my bathroom fan and vanity lights came. They have #14 stranded wire in them. I have #12 wire from the breaker. Can I wire these lights into my circuit? I guess what has me stumped is why they would build these units with smaller wire when a bathroom is required to be protected by a 20 amp circuit. Any help would be appreciated. Thank you
That's perfectly fine. The device wiring is based on the device requirements and 14 (sometimes smaller!) is fine if designed tested and certified (UL) appropriately.
Code requirements are based on the total circuit load which may vary as attached devices change and therefore must be the right match of wire and breaker.
The Code doesn't deal with wiring that's an integral part of equipment
The NEC ampacity rules do not apply to wiring that is an integral part of equipment, as stated in 310.1:
310.1 Scope. This article covers general requirements for conductors and their type designations, insulations, markings, mechanical strengths, ampacity ratings, and uses. These requirements do not apply to conductors that form an integral part of equipment, such as motors, motor controllers, and similar equipment, or to conductors specifically provided for elsewhere in this Code.
Instead, the UL standards for various pieces of equipment govern wire sizing within that equipment, either based on engineering calculations, standard rules, or actual temperature rise tests.
You can install a 15 amp device, on a 20 amp circuit, it's permitted, I strongly recommend pig-tailing the connections so that you could still install a 20 Amp device downstream. You just can't install something that is exceeds the max amperage of the circuit breaker or wiring.
As for the gauge of wiring, if an end device doesn't draw much amperage, it can use smaller gauge wiring because devices downstream won't be sending current down it's smaller wires. Notice unlike a receptacle device, you won't see line and load on that small gauge example, thus forcing you to pigtail any downstream connections. I've installed led lights that had 18 gauge wiring, at least if I remember correctly.