Doorbell transformer has two black wires and one green. How can i tell which one is hot?
There are multiple possibilities here.
Black to black will be the maximum output voltage (24v example).
Some transformers have a 1 and a 2 or A &amp; B on the wires when connected to #1 terminal to green there is 1 voltage (16v example).
#2 Terminal to green is a different voltage (8v example).
The 2 different voltages add to the maximum voltage in some cases the voltage is the same 12 &amp; 12 and again the total is 24v
So it depends on the type of transformer secondary but black is hot in all 3 cases.
How can both be hot? A transformer creates a separate derived source of power in code speak and until a ground point is created we don’t know so we need to know the type of transformer first. A center tapped transformer the center tap is normally grounded. A black to black on the secondary the green is usually not needed and wire nutted either side at that point can be grounded.