Use header toggle in automation

Is there a way to call a header toggle in automation? I have several cards with multiple entities that i want to toggle with scripts or automations? Preferably with the header toggle so when adding entiteis to the card i don’t have to update the automation itself.

did you find a solution?
I’m wondering exactly the same…

@jaumefabulus no. No response yet. And did not have time to investigate any further. Please update if you have found a solution.

Short answer, no. The back end knows very little about the front end, deliberately.

You can however add all those entities to a group, and toggle that group (which will change the state of all the entities in the group).

So the old groups will be in place for this. Bummer. Double management.