Advice automation strategy zigbee, wifi,

What the heck is a “capacitor switch”?

Just hire a qualified electrician. You have no idea what you are doing and no business toying with mains electricity. You could kill someone.

oh. i meant capacitive.
Yes, I will hire an electrician but I wish to understand for my own learning purposes