Simple off/dimming doesn't work

I have tried about everything. I have a program that flashes 4-5 different lights if a condition is met.

It works but at the end they are supposed to go back off or dim to 0

They all stay on at 1% i even ran two do loops just in case. The device ID is currently set to 305 through a variable and I checked using ZeroBrane

Being the rest of the code works while using the device id I am wondering if I need to use the alt id?

Here is the end/reset code:

–Set to original status
for i, device in ipairs(array_dimmers) do luup.call_action(“urn:upnp-org:seviceId:SwitchPower1”, “SetTarget”, {newTargetValue= “0”}, device)
for i, device in ipairs(array_dimmers) do luup.call_action(“urn:upnp-org:seviceId:Dimming1”, “SetLoadLevelTarget”, {newLoadlevelTarget= “0”}, device)

Try using only SetTarget in your end loop.