Intending to you kill someone for robbing you is illegal as well if you are not in danger (being at work in this case)
Actually, that depends entirely on which state you live in. Some states under Castle Doctrine allow deadly force to prevent the commission of any felony in your home, including robbery.
That, so far as I know, does not apply to booby traps.
http://en.wikipedia.org/wiki/Castle_Doctrine_in_the_United_S...