Trigger only between certain times

I have been working with PLEG a short time and have been able to do most of what I need by reading the posts by other members - thanks so much for all the input.

However, one specific process eludes me. I want to be able to set my house alarm when the house “goes to sleep” but only between the hours of 10:00 pm and 5:00 am the next day. So far, I am using three lights in the kitchen to determine when we are going to bed. If they are all off, I want the alarm to set - however, since they can be off during the day, I only want to trigger the alarm from 10:00 pm to 5:00 am. Also, if someone gets up in the middle of the night and turns off the alarm to go in the garage fridge for a late night snack, I want to reset the alarm after the lights are turned off again (signifying that person has returned to bed).

Any direction is much appreciated.

I have done a little more playing with the schedules and this is what I came up with. I think this will set the alarm anytime between 10pm and 5am the next day when either the cabinet light, kitchen light, or sink light are turned off. Any thoughts?

tSinkLighOff SinkLight turned off
tCabinetLightOff CabinetLight turned off
tKitchenLightOff KitchenLight turned off

Schedule On Type On Time Off Type Off Time
sBedTime Interval 20:00:00 Interval 05:00:00

cBedTime sBedTime AND tSinkLightOff AND tCabinetLightOff AND tKitchenLightOff

Then use the satisfied condition of cBetTime as a trigger for a vera scene to set my alarm

For times that span midnight use the NOT (!) operator with the opposite schedule.

ie to set 2200 to 0300 use NOT (0300 to 2200)

Thanks for the input - I’ll make that change.

Also, the Interval timer did not seem to work for me - it never changed to true so I switched to a Day of Week timer and selected every day and that seems to switch from true to false as expected. After re-reading the PLEG Basics (several times) I now understand the difference - when Interval is set to 22:00:00, that means it will flip to true every 22 hours, not at 22:00.