sleep does it actually rule it out? Have you got a link to the info on that? I thought it was just on the basis it couldn't be proven he didn't know it was her. Nobody really believes he didn't know it was her though do they?
It doesn't rule it out, no. I'm personally of the view that he absolutely knew. But it isn't what he was convicted of, so it's not a legal fact.
The thing is, criminal law and civil law are different. Civil law (a financial dispute, or a family court, etc - one where police aren't involved) and the burden of proof is just what is most likely in the circumstances. A criminal court, and you have to be sure beyond all reasonable doubt; any logical, sensible doubt at all that the person didn't do whatever it was, and you have to find them not guilty. That's why it is so unfair when people proclaim that a woman has lied if a man is found not guilty of rape, because the test isn't who is most likely to be telling the truth, but whether there is any reasonable way he could be telling the truth.
In this case, he said he didn't know it was her, just that someone was in the loo. In the first trial, the judge misapplied the law, and decided that if he didn't know it was her, he didn't murder anyone. That's not the law, because he didn't restrict himself to reasonable force, and he wasn't in imminent threat of harm. He thought someone was in that separate loo, and he shot them repeatedly, and to kill, after going into that bathroom. He sought them out and emptied some extremely nasty bullets into them. You don't get to do that within the law unless someone is about to harm you.
I don't see how anyone could think he had no idea. She was standing facing the door with her phone in her hand. She'd locked the door to the loo when he claimed he'd been asleep, so why would she need to? And if he thought there was a home invasion then the last thing he should want to do would be to leave her alone and unarmed behind him, which he claimed he thought he was doing. None of it adds up. But it's reasonable to say that those bits of circumstantial evidence don't prove his intention to harm her beyond doubt, so then you fall back on the second point, which is that he clearly knew that someone was in there, and he deliberately went into that part of the house to kill them. He was reckless as to their life and he intentionally killed them without cause, and not in self defence, which is murder, whoever they were.
TLDR: it doesn't matter if he knew or not. He had no right to kill anyone unless it was self-defence, and the appeal judge held that it wasn't, so their identity was besides the point.