Achieving Automatic Turn-Off for Template Switches

I’m currently working on setting up a template switch in Home Assistant to control my soundbar’s volume. The goal is to have the switch turn itself off after triggering the volume commands, so it’s clear that it can be used again. I’ve tried a few approaches, but it’s been a bit tricky to get it working smoothly. Here’s what I’ve done so far: I created a template switch that sends the ‘VolumeUp’ command three times when turned on. I thought adding a turn-off action would solve the issue, but the switch stays on after sending the commands. I even tried using a script to turn it off, but it didn’t work as expected. It seems like the commands execute, but the switch doesn’t reset its state properly. I’m wondering if there’s a better way to structure the template switch or if there’s a different approach altogether. Maybe there’s a way to have the switch automatically turn off after a delay or by using a different service. I’ve heard about using ‘toggle’ actions, but I’m not sure how to apply that here. If anyone has experience with template switches and can offer some advice, I’d really appreciate it! I’m optimistic that with the right configuration, this setup can work perfectly and provide a clear, user-friendly interface for controlling the soundbar.