Save current Lamp state

maybe you should have a look at this: Persistence based, GUI reconfigurable scenes