I am looking for a lovelace card where the header toggle controls a switchable entity (like an automation or input select) and when it is turn on (or off depending on the use case) the rest of the card is displayed.
Check out the “Fold Entity Row” card in HACS. It tried to do what you’re describing with a conditional card which keyed off an input_boolean, but this “fold entity row” card is much better. I use it to show/hide some of the advanced configuration options in my front end.