Twist the a few floor wires jointly in the main box and safe them which has a wire nut. Then, connect the tip of the shortest ground wire for the environmentally friendly terminal on the switch. Before buying smart devices, Check out to find out if you have a neutral https://alexisihdzt.tinyblogging.com/fascination-about-wiring-to-lights-78486111