Yes, this action is moral. It is saving the life of another person, therefore promoting happiness and mitigating pain.
However, this action is only okay when it comes to denial. The homeowner said that the man wasn't in his house, which was denial, and okay for him to say.