Shadow Demons (MM, p. 64) have two abilities that seem to want to work in conjunction with each other:
- Shadow Stealth - While in dim light or darkness, the demon can take the Hide action as a bonus action.
- Claws - Melee Weapon Attack: +5 to hit, reach 5 ft., one creature. Hit: 10 (2d6 + 3) psychic damage or, if the demon had advantage on the attack roll, 17 (4d6 + 3) psychic damage.
The SRD says "You can't hide from a creature that can see you clearly", and dim light is considered to be lightly obscured. So it would seem that as long as the Demon is in dim light, it can't be seen clearly and thus can hide as a bonus action.
But there are a number of other questions about the same topic regarding rogues and their Cunning Action that seem to suggest that rogues can't use their bonus-action Hide to run, move out in the open, and then attack with advantage (see Can the rogue repeatedly hide in combat to sneak attack the same enemy? and Jeremy Crawford's responses to Twitter questions about doing so) - but in this case, combat isn't "out in the open"; it's in partially obscured conditions. Can movement be included in the Hide action?
And if the Demon can hide successfully (assuming it beats a contested perception roll), am I correct in assuming it can attack with advantage?