So far as I can tell from your post, you cast hypnotic pattern, charmed four targets, and then an ally who was not in the room when you cast the spell ran back in and tried to attack a target that was unaffected.
If that is right, as DM, I would have described the environment as it stood after the casting of that spell prior to the player describing what he or she wanted to do. That description would most certainly have included which targets were standing slack-jawed and mesmerized and which ones were angrily rubbing their eyes and preparing a counterattack. A common mistake DMs make is that they describe the environment at the beginning of the fight, then that's the end of that. The basic conversation of the game is a loop on each player's turn. The environment needs to be described again when it changes so that the players are making informed decisions from their characters' perspectives.
As a player faced with such a DM, I would have described my character watching the enemies in the room to see which of them were on the defensive and which ones were not. When that was described, I would then call that out to the rest of the party and commence my attack.