Chasing lights (delay / timer) in a rule

I want to chase the lights before cutting power off.
There are four Lights, which should be switched (dimmed) off before switching of the power

Both attempts seem to ignore the Commands, and directly cut-off power / ZWSwi36.sendCommand(OFF)

My attempt using Thread::sleep

if (ZWSwi36.state == ON)
{
	Tradfri_Dimm_1.sendCommand(0)
	Thread::sleep(1000)
	Tradfri_Dimm_2.sendCommand(0)
	Thread::sleep(1000)
	Tradfri_Dimm_3.sendCommand(0)
	Thread::sleep(1000)
	Tradfri_Dimm_4.sendCommand(0)
	Thread::sleep(1000)
	ZWSwi36.sendCommand(OFF)
}

And a Timer / without chasing

if (ZWSwi36.state == ON)
{
	Tradfri_Dimm_All.sendCommand(0)
	if(Tradfri_off == null)
	{
		Tradfri_off = createTimer(now.plusSeconds(4)) [|
				ZWSwi36.sendCommand(OFF)
		]
	}
	else
	{
		Tradfri_off.cancel
		Tradfri_off = createTimer(now.plusSeconds(4)) [|
				ZWSwi36.sendCommand(OFF)
		]
	}
}

Please post your items file.
What type of item is ZWSwi36 (switch, or group)?

The whole items ile is way to large.

ZWSwi36 = a switch (device: fibaro fgs-212)
Tradfri_Dimm_All = a dimmer (which will controll Tradfri_Dimm_1 - 4 using a rule.
Tradfri_Dimm_1 (…) 4 = a dimmer (device: IKEA Tradfi)

There is nothing wrong with this Rule (besides the fact that you shouldn’t be sleeping for that long in a rule).

We don’t need the whole file, but seeing exactly how you have these six Items/Groups configured is vital to our ability to help you. Don’t assume you know what the problem is and censor the information you provide to us.