So I'm right but wrong. What position are you arguing? Was he wrong to do it, and justly imprisoned? Or was he morally right, but ran up against an immoral law and unjustly imprisoned?
No state that I'm aware of makes you a prisoner in your own home if there are bad people outside. Most states, no matter where you are, empower you to defend yourself when you reasonably believe you are in danger of death or great bodily harm, or to halt the commission of a felony.
There doesn't need to be a law stating "you can leave your home and shoot an unarmed person who isn't on your property".
He was free to leave his home.
The violent mob in his front yard presented a threat to his safety, and he defended himself.
That's all that's required. Anywhere other than NY, CA, MA, or a handful of other legal shitholes, he would have been fine, as you have already agreed.