The question has to be WHY? Why go out on a limb with a fancy custom control system, when there are better, standard, and well integrated methods for light and power control?
Any standard switch can be swapped in minutes, for a smart switch, easily programmed by the likes of Alexa, to operate...