Joined
·
1,324 Posts
Can you post a pic of your current wiring (since it is now a "total mess")?
you have a traveler and the switch leg crossed.
Cowboy is right. Set it up exactly like the diagram and you'll be good.
I don't think it is a violation. The fixture has black and white wires connected to it. That code is made so that you don't have two white wires at the fixture.The diagram will work, but technically shows a code violation of 200.7. The white can only be used as the feed to the switch.