Virtual pin


I would need help with code for video that i found on youtube Could someone help me please? The part that i need most is virtual pin as confirmation
if led is on or off(or relay…),because some time i lose power supply and i dont know at what state is
ESP output,thanks in advance

anyone,pretty please?

I haven’t watched the video but you might find the answer at