There are several options for what to do about switches when you have smart bulbs. See the following. (This is a clickable link)
As far as the copy and paste method for custom code, that is fully detailed in the custom code FAQ. Again, this is a clickable link. 
1 Like