I have seen this at the table: but it's not an Easy Button
The rules on giving circumstantial advantage are a great way to reward cleverness, innovation, and teamwork by the players as they try to set up situations where advantage would accrue. I had advantage awarded to my cleric for doing something a lot like that with Thaumaturgy, in our first campaign. Learning from that, I've looked for innovative uses of various skills to do likewise.
The DM can also decide that circumstances influence a roll in one direction or the other and grant advantage or impose disadvantage as a result. (Basic Rules, p. 60)
Using Thaumaturgy that way, if the player(s) set(s) it up, would be one way to fold that higher level concept - applying circumstantial advantage / disadvantage - into mechanical results in play. The key is in listening to the players as they respond to the basic flow of the game.
- The DM describes the environment.
- The players describe what they want to do.
The DM narrates the results of the adventurers’ actions.
Setting a climate at the table where coming up with clever solutions to difficult situations is encouraged, and sometimes mechanically rewarded, is a place where this edition shines. But it takes more than looking at an If/Then rule statement: context and set up, like a good joke and its punch line, are a key to getting the most out of each opportunity.