Newbie - lights control question

Hi
I am sorry, a bit lost here. Coming over from ZWave and Fibaro HC2 where I found a plugin that did this. Here, it looks like I have to write it, but I am a bit lost about how to start.

Basically I want an automation or script (confused) that when:
-the house is occupied (helper reading the alarm system)
-the living room is occupied (reading a switch)
then, depending on the time of day (night or day or dusk) and if its a weekday or not, sets about 4 lights in several states. Maybe have one for watching a movie, etc.

I tried to use the blueprint Smart Lights, and maybe it is good, but it cannot seem to handle different situations like this, and can only control one light.

I tried to make an automation, and I can setup on of these situations, but then I have to make one for each of them (day, night, dusk, etc). So I tried to open it in YAML mode and add several automations in one yaml file, but that didnt work out.

Should I approach this as a scene? or somehow write an automation that can have several states and several outputs?

An automation can do this for you.

The Trigger will be the state change for “house is occupied (helper reading the alarm system)”
The condition with be “-the living room is occupied (reading a switch)”
The action will be “If this then action” for “depending on the time of day (night or day or dusk) and if its a weekday or not, sets about 4 lights in several states. Maybe have one for watching a movie, etc.” and the desired effect.

I don’t know if someone can help with a script, but this will surely work with an aitomation.

thank you, that was helpful. I did not realize you can put if/then into the action part.