I would like to create an automation with multipple variables

I would like the ac cooler to start between 10 and 22 if temperature outside is above 20 degrees and dates are between 1st of may to end of august.
How can I accomplish this?