Help with condition

I know it’s probably something simple, but I just can’t seem to work it out. I have the below condition, and it works the way I want, currently. However, I need to stop this condition from becoming true between 5:30 AM and 7:00 AM (my daughter doesn’t move enough at the bar in the morning to keep it triggered). Having it only occur Monday - Friday would be a bonus.

pendantLightsOff kitchenMotion AND (kitchenMotion; NOW > 6:00)

Any help would be appreciated.

Under triggers add a Schedule (MorningSched) for weekdays 05:30-07:00

pendantLightsOff = NOT MorningSched AND (KitchenMotion AND (KitchenMotion;Now>6:00))

That will prevent the Off condition from becoming true during the schedule.

The time window could be done like this:

pendantLightsOff kitchenMotion AND (kitchenMotion; NOW > 6:00) AND NOT (05:30:00; NOW; 07:00:00)

If you want to include days, use a Schedule:

Schedules
MtoFAM StartType: Weekly, Days: Mon-Fri, Time: 05:30:00, StopType: Weekly, Days: Mon-Fri, Time: 07:00:00

Conditions
pendantLightsOff kitchenMotion AND (kitchenMotion; NOW > 6:00) AND NOT MtoFAM

Edit: Just as @Bulldoglowell suggested. :smiley:

You guys are awesome! Thanks!

Okay, so this seemed to have worked at first, but occasionally, the lights will turn on and turn right back off. I can’t see what’s causing it, the logic looks okay.

Triggers
isNight Day or Night indicates Night time. true 2014-05-16 19:49:12.153 2014-05-16 07:09:40.115
kitchenMotion Kitchen Motion Sensor armed is tripped true 2014-05-17 05:40:19.004 2014-05-17 05:37:51.054

Schedules
mornLightSched Weekly 05:30:00 1,2,3,4,5 None Weekly 07:00:00 1,2,3,4,5 None false 2014-05-16 05:30:00.106 2014-05-16 07:00:00.100

Conditions
pendantLightsOn Yes (isNight AND ((isNight; kitchenDoorPinUnlock) OR (isNight; kitchenDoorPinUnlock3))) OR (isNight AND (isNight; kitchenMotion)) true 2014-05-17 05:40:19.010 2014-05-16 19:49:12.161
pendantLightsOff Yes (pendantLightsOn AND (pendantLightsOn; NOW > 6:00)) AND (NOT mornLightSched) true 2014-05-17 05:48:25.110 2014-05-17 05:45:25.110

EDIT: I think I see the issue - I’m changing this condition:
pendantLightsOff Yes (pendantLightsOn AND (pendantLightsOn; NOW > 6:00)) AND (NOT mornLightSched) true 2014-05-17 05:48:25.110 2014-05-17 05:45:25.110

to:

pendantLightsOff Yes (pendantLightsOn AND (kitchenMotion; NOW > 6:00)) AND (NOT mornLightSched) true 2014-05-17 05:48:25.110 2014-05-17 05:45:25.110