Hi All, Am looking for a bit of guidance with some logic. I have bathroom lights that are triggered with a PIR but would like the on times to be different depending on the time. For example between 7am - 11pm want the lights to be on for 2 minutes, then between 11pm - 7am want the lights to be on for 30 seconds. I have written this in a PAC. Would this work fine? or is there any other or more efficient ways of doing so. [CODE]once (GetCBusState("Manor Farm House", "PICED Triggers", "TRIGGER - MSTR BATHROOM - NICHE") = ON) then begin SetLightingLevel("MASTER BED - LED STRIP / GLO19", 100%, "0s"); end; once (GetCBusState("Manor Farm House", "PICED Triggers", "TRIGGER - MSTR BATHROOM - NICHE") = OFF) then begin if (Time >= "07:00:00") and (Time <= "22:59:59") then begin Delay("0:02:00"); { CHANGE TIME HERE } SetLightingLevel("MASTER BED - LED STRIP / GLO19", 0%, "0s"); end; if (Time >= "23:00:00") and (Time <= "06:59:59") then begin Delay("0:00:30"); { CHANGE TIME HERE } SetLightingLevel("MASTER BED - LED STRIP / GLO19", 0%, "0s"); end; end;[/CODE] Thanks for you help