With control circuits "switching" the negative wire is common. If you look up holding contact circuits in google and click images you will see quite a few circuits with something similar to what you are doing. Using a on, off, auto configuration. Plus its your equipment, NEC code really applies to electrical work being provided for people who don't know anything about electricity. As far as the safety side of things are concerned, what you are doing is safe. Its just a switch.