Connect the cables from the switch to the transformer

Connect the cables from the switch to the transformer using wire nuts: black (+) connects to the live 120V AC, green connects to the ground wire, and white (-) connects to neutral.