Code snippet for 3 in 1 sensor

Does anyone have a code snippet I could have that will turn on lights based on the light level from the sensor? I have looked thru the wiki and w/o something I can use, I am having trouble figuring out the coding.

Thanks

Bill

The current light level for the device with the device number devnum is:

luup.variable_get(“urn:micasaverde-com:serviceId:LightSensor1”,“CurrentLevel”,devnum)

Please note that devnum must be the device number of the light sensor, not the
device number of the parent device.