This isn't legal advice, mostly advice on how to not get shot. If you go into someone's home unannounced (even just to return their lost cat) or try to threaten a trespasser on your land you can be killed and it will be YOUR fault.
I am not a lawyer, but I do want to make sure that I know what my legal responsibilities are as a citizen. If you need an attorney to tell you when/how to use deadly force then you are probably already in trouble. You don't get to choose the time or the place that someone tries to kill you.
If you are an armed citizen please seek training in how to safely and legally use your weapon. Knife, gun, batons, or even less than lethal weapons included. It could keep you out of prison.
No you are right! I know a lot of people who, when they get a gun or a knife, get all bright eyed and bushy tailed. Harboring childish fantasies of getting into a fight and coming out the hero like in the movies. I should have emphasized the point that if you go looking for such a fight you are very likely going to end up in prison.
A better thing to say before giving such advice about home defense would be to preface it with: "In a home invasion it is always better to take your family and hole up while waiting for the police rather than trying to confront the burglar."