Electrical dilemma - Control single-pole light with ESP8266 and Relay

I wish to put my ESP8266 + Relay + Transformer ,into light switch in order to control it remotely.
I have been able to control NodeMCU by Google Home device... so I wanted to control my kitchen light with: NodeMCU, Transformer, Relay.

But the issue is single-pole light switch.

  1. I have to always supply to Transformer 120V
  2. When relay disconnect the light still will be on (flowing through transformer)

My load will be led bulb, :

WiFi controller (NodeMCU) and Relay will get power from little Transformer:

Take the transformer lead from the switch side of the lamp to the supply side of the lamp, the transformer will still always be on.
OR
do the above and put the wifi switch in the lead to the transformer primary (check that the switch will take the voltage and the current (inductive current).

Dead_Ard

A transformer puts out AC only. I don't think your components would like that.

Why not use an old 5v phone charger? Open the case and re-purpose it to attach wire leads. Use the line and neutral that are in the switchbox already.