Well the only problem I see with this solution, is that nowhere in the problem ( unless I missed it ) there's any mention of a "companion"! I've read a lot of similar puzzles including two, and not just one companion, I assume you've read some of them too and thought this one was the same!
For the sake of argumentation, let's say there's 2 companions.
Asking this to the demon will give you, as you said, a yes/no answer, depending on the demon's mood.
Asking this to the angel... that's where it gets complicated, and we might not have enough information to know for sure what would happen.
First of all, those demons/angels, do they know everything? If they know everything, then the angel could actually answer you, because he'd know what the demon would say.
If they don't know everything... Well, now it's personnal interpretation... You could even ask them "What is 37 + 129" and they could remain silent, if they're not very good at math... Or any question at all really.
To find out who, out of an angel and a "lie/tells the truth" demon, is an entity, you need to include, in your question, some complex logic.
I'd sure like to be proven wrong, but I don't think there's any simple question to ask, that will work.
I'm not 100% sure about my proof... but here we go.
-The angel tells the truth
-The demon can lie or tell the truth, at will
-If a demon choose to tell the truth, his answer will be the same answer an angel would give, UNLESS the question is about himself
(The angel and the honest demon would both answer "4" if you ask them "What is 2 + 2?" but they would not answer the same thing if you ask them "Are you a demon?".
That's the first "key" to find the question. Because that question is actually two questions, not just one. The "you" changes everything.
Let's say there's only one angel and one demon on earth.
The angel name is God, the demon name is Lucifer. ( how original! )
If you ask them "Are you a demon", you're not asking them the exact same question.
You're actually asking to god "Is god a demon?" and you're asking to Lucifer "Is Lucifer a demon?".
In this case, the "you" changes the answer to the question, depending on who you're asking it to ( as long as they're telling the truth ).
God will say "no" and Lucifer will say "Yes", because the question doesn't have the same truth value if you ask them both.
That's why I use this "you" in my question ( in my first post ) "Are you an angel or are you lying to this question?".
It looks like I'm asking them the same question, so you'd wonder how this will help me if the demon decide to tell the truth ( the angel always tells the truth )...
But the question I'm actually asking to the angel, God, is :
"Is God an angel or are you lying to this question?".
and the question I'm asking to the demon, Lucifer, is :
"Is Lucifer an angel or are you lying to this question?".
The question I pronounce is the same, but the question they receive and perceive is not the same.
God will tell "yes" to this question no matter what ( he's an angel ), And Lucifer will answer "no" to this question no matter what.
If he's lying, "no" or "yes" = yes, he lies so it's a "no"
If he's honest, "no" or "no" = no, he's honest so it's stay a "no".
I don't think it would be possible to do it with a simple question ( no "or" or "and", i.e. a single part question ) because there's 3 different possibilities, and a simple yes/no question can only find out between 2 possibilities.
There's always one thing that doesn't work right if you try to find it with a simple question.
it's easy to find a simple question that would sort apart an honest demon and an honest angel ( Are you a demon? )... but it wouldn't work if you ask it to a lying demon ( he would just say "no", like the honest angel ).
It's also easy to find a simple question that would always get the same answer from an honest OR lying demon ( "are you lying?" they would both say no ), but the angel would answer the same.
So you would need to find a simple question where
-The honest demon and the lying demon answer the same
-It must be the opposite answer the angel would say
If the honest demon doesn't say the same thing than the honest angel, then the question must concern their identity ( are you a demon? ) or personnality ( do you lie sometimes? ), but in both cases, the lying demon would not say the same thing the honest demon would, UNLESS the question has 2 parts.