I created a virtual device that had most of my devices in it so I could turn them all off with the press of one button. I used the group dimmer driver.
I forgot how I did this, how I can edit it and how I can populate another such device.
If your automation is still in existence, then you should be able to navigate to the device, scroll to the bottom of the Device edit page and look at the In Use By section to see the Apps the Device is... Is Use By
If you're looking to implement this again from scratch, I will leave it to those with more of their Sunday to ponder this....
Simply build a button controller and have it turn off all your devices. I do this as a shutdown routine. Easier than trying to make groups..
Swap pico for a virtual button device (to create button, click devices, add device, virtual device, and pick virtual button controller (set amount of buttons you want) . As you can see button 3 turns off just about everything in my house.