Hi and welcome to the Homey community,
There are already multiple tutorials available. From easy light control flows
up to advanced light control flows:
I guess you will find a solution for your requirements. If not, just ask.