Migrating to HA

Greetings.
Iam trying to migrate from domoticz to ha.
But Iam currently lost in how do I keep my light off at night?

In domoticz so do I have a few virtual switches to keep the light off at different times.
As when we go to sleep so am I turning on Virt_Sleep. That is stopping all my scripts from running.
But how does it work on home assistant?
Are there any variable to set for it or how do I do that?

I have tryed to google it but I cant find anything thats explaining it to me.

Regards Magnus Svensson.

any automation you can speficy active times… if you really need central adimistration of allowed schedule, you’ll have indeed options for virtual switches and control that with schedule. Then in automations use state of that switch as condition.

A virtual switch = input_boolean in HA

lol… yes, was trying to link something

Wonderful thanks all =)
It looks as Iam having a huge wall to climb up with automations here.
Im used to have virtual switches and lua script to do all my automations.
It looks a little diferent here, but it have a much better looking UI then domoticz have.

Ive not been in contact with yalm befor, so till will be intresting.
Thanks again =)

Regards Magnus Svensson