Auto switches as lights

The light switch platform is great but it’s painful to have to specify every light one by one in the config file. It would be so much better if we were able to say do it automatically for every switch, it every switch that follows a given pattern of name or parent integration.

Maybe this is possible. If it is, how and, if not can it be?

+1 and same for switch as fan