Luup code in scene not executing

I’ve got a scene that’s triggered by a motion detector to switch on a light.

The trigger’s luup event code has:

[code]local device = 8

function complete_dim()
luup.call_action(“urn:upnp-org:serviceId:Dimming1”,“SetLoadLevelTarget”,{ newLoadLevelTarget=“0” },device)

luup.call_delay( ‘complete_dim’, 60)

It doesn’t dim down after 60 seconds. In fact nothing happens. I’ve also tried it with ‘return true’ at the end, as well as trying it as a non-trigger LUUP in the scene (code in the LUUP tab when editing a scene).

Any ideas?

Change newLoadLevelTarget to newLoadlevelTarget - lowercase l in level. Don’t ask why, just accept it. ;D

Thanks :slight_smile: