Using Cards in Automation

I have a list of about 35 separate lights in a love lace entity card. Is there anyway I can just tell HA to turn on that card at sunset and turn it off say 5 hours later? I don’t see how to use automations or scenes without entering all the entities one at a time again. Thanks, Fred J.