Transformer originally installed by builder 20 years ago behind the chime box. I'm installing a 16v 30va transformer for a Eufy video doorbell. Can I just replace the transformer as is or do I need a different installation? This is a tap in between a ceiling light and a light switch. Not much wire to work with. Thanks for any help.
The transformer is in a box so it’s not horrible but normally a doorbell transformer is mounted outside the box , the 120v connections made inside and the low voltage connections made outside the box. In this case both high and low voltage are in the same compartment , that would not fly in my jurisdiction with out a non conductive shield (plastic insulator dividing the hv / lv. Unless the MFG instructions directed it done that way.
That's not allowed by Code. Mounting a transformer in an enclosed plastic box will not allow for necessary heat dissipation.
That's why doorbell transformers are always mounted on the exterior of a wall (for full air-flow) and/or on a METAL junction box with the low-voltage terminals fully exposed.... the metal acts as a heat-sink to help dissipate heat.