You can use Entropic Ward so long as a creature is making an attack roll and you can take reactions; there are no other requirements.
The feature never says that you have to be able to see whoever is attacking you, nor do you have to know where they are, or anything of the sort. The only thing required is that a creature be making an attack roll against you, and if this is the case, you may use the feature.
For an example of a feature that uses your reaction and does require you to be able to see your opponent there is hellish rebuke:
1 reaction which you take in response to being damaged by a creature within 60 feet of you that you can see
Here are some scenarios where you wouldn't be able to use Entropic Ward:
- You used it earlier and have not taken a short or long rest since then.
- You are currently surprised and your turn hasn't come up in initiative:
If you're surprised, you can't move or take an action on your first turn of the combat, and you can't take a reaction until that turn ends.
- You are incapacitated:
An incapacitated creature can't take actions or reactions.
Note that Entropic Ward is used before the roll is actually made
This can be shown by comparing the wording of Entropic Ward to that of other features such as the Bard's Cutting Words feature:
Entropic Ward:
When a creature makes an attack roll against you, you can use your reaction to impose disadvantage on that roll.
Cutting Words:
When a creature that you can see within 60 feet of you makes an attack roll [...] you can use your reaction to expend one of your uses of Bardic Inspiration, rolling
a Bardic Inspiration die and subtracting the number rolled from the creature’s roll. You can choose to use this feature after the creature makes its roll, but before the DM determines whether the attack roll or ability check succeeds or fails [...]
You cannot choose to use Entropic Ward after the creature makes its attack roll, and thus the feature must be used before the attack roll is actually made.
A small note: Entropic Ward doesn't flatly remove advantage and replace it with disadvantage, it only applies disadvantage to the attack. Since the attacker is hidden they would ordinarily have advantage and due to Entropic Ward would now have both advantage and disadvantage, a scenario about which the rules state this:
If circumstances cause a roll to have both advantage and disadvantage, you are considered to have neither of them, and you roll one d20. This is true even if multiple circumstances impose disadvantage and only one grants advantage or vice versa. In such a situation, you have neither advantage nor disadvantage.