Hi all, I have a situation where I need to disable some channels or groups on a relay after a power failure to prevent overloading a backup power supply. I was wondering if there is any way of writing logic to prevent groups turning on until a condition is met. At the moment I can turn groups off upon power failure, however I can't nut out a way to keep them off until the mains power is present. For instance, I would like the logic to prevent switches and touch screens from turning certain groups on / off whilst in ups mode. I can't use an area address as I still require some channels to operate. At the moment any logic I've written goes into a continuous loop and fails to compile. Does anyone know of a way of writing logic with the following idea? once (GetLightingState("Mains Power Present") = OFF) then begin; SetLightingState("Alfresco - 2 x wall lights", OFF); [COLOR="Red"]UNTIL MAINS POWER PRESENT[/COLOR] SetLightingState("Alfresco - 3 x downlights (2)", OFF); [COLOR="Red"]UNTIL MAINS POWER PRESENT[/COLOR] SetLightingState("Alfresco - 3 x downlights (1)", OFF); [COLOR="Red"]UNTIL MAINS POWER PRESENT[/COLOR] end; If anyone could please throw me some ideas I'd be very greatfull. Regards, Damon