I currently have my dashboard setup with Entities cards, which I like because there is a master switch at the top-right to toggle all the entities on/off:
I see, I completely missed that you still had the toggle switch on the card. You could probably create a light group and have the toggle switch control that and then use the buttons to control each light. I do that for several of the rooms in my condo. For example, my bedroom has four droplights that all function independently but on my dash board have I have one button for off, low, med, and high settings which triggers a script. I also have another button that triggers a popup light card if i want more control. You should be able to use a light group in a similar way with the toggle button.
I have been able to make some progress using Mushroom cards (specifically the Title cards that have tap actions and Template cards also). Still working out some things, but it's going in the right direction!
There are many ways to do this. Using a Group Helper and auto-entities is the least amount of YAML / templating I think. I did a quick/dirty, you can change all the visuals you'd like...
Agreed(Auto-Entities is a solid method), but adding custom styles using the filter method you provided is not very clear cut for most.
@chris.reeve4 I'd suggest this as an alternative method
Create a switch group for the devices and then add a label like switch-group to those specific device. As Ltek mentioned, other methods are available so use this as a starting point.
I landed on the method I presented after trying several, for a few reasons...
its overall less code for most things
the filter is really, only, standard button code inside a wrapper
the big one... It works easily and every time. Auto-entities is SUPER problematic with trying to format the visuals with custom cards especially... then adding ha-card, card-mod, etc is even harder. The filter method is far more predictable
If you use AI to generate / replicate cards, using my method as a "template" worked 100x better, AI understands it better, always. When AI uses DOM and CSS with YAML it is a battle because of the massive cluster-f HA is with all the different cards, no standards for how cards handle styles (they all use, or dont use, DOM/CSS/etc differently), etc