I could not find a specific example in Canon or Legends to suggest that there has been a booby trap designed to activate based upon a lightsaber, though there are examples in the Canon of people leaving booby traps specifically for Jedi:
In SWTCW S02E21 "R2 Come Home", Boba Fett booby traps his father Jango's helmet with an explosive to try and kill Mace Windu in the wreckage of the Star Destroyer Endurance (after it has crashed on Vanqor). A Youtube clip of it can be seen here
In SWTCW S02E01 "Holocron Heist", when Cad Bane booby traps TODO and sends him to kill the Jedi in/blow up the Communications Center
As per the example in the OP's question, lightsabers are quite likely to ignite flammable gases as is discussed in this thread. While I cannot find an example of a trap specifically tied to a lightsaber, there is one example of a booby trap that is similar to the scenario in the OP's question that would be triggered by a lightsaber. In Timothy Zahn's 2013 novel Scoundrels, there is mention of something called a honey trap in Chapter 4:
“What could be a problem is if the plating is honey-trapped,” Bink
warned. “Even something that thin has plenty of depth to work with.”
“What’s a honey trap?” Eanjer asked.
“Honeycomb-style booby traps,” Bink explained. “You put pockets of
explosives, acid, or pressurized poison gas inside your walls so that
whoever’s behind the cutting torch gets a lethal surprise halfway in.”
“It’s all the rage among the better class of paranoid criminal
bosses,” Dozer added dryly.
Since honey traps are designed to ignite/release upon contact with a cutting tool, and lightsabers have been used as cutting tools, that would be one scenario where a lightsaber could trigger a booby trap, though it is not mentioned that it was specifically designed for lightsabers.
On a side note, it is mentioned that lightsabers themselves can have booby traps in them.