The template documentation got a big overhaul earlier this year, so I would be surprised if it isn’t in there somewhere…
Where it’s appropriate, it’s a great way to create branched logic, without having to draw all the branches; keeping the automation concise and readable. And, the IDs don’t need to be unique like in this example, so you can have a handful of triggers with the ID “on” and a few with the ID “off” and then just use that to define an action like:
action: switch.turn_{{trigger.id}}
target:
entity_id: switch.example
It’s definitely covered once or twice in the articles in the Cookbook.