# Change XYZ to the UID of your Ambient Light Bricklet 2.0

setup:
	# Handle incoming illuminance callbacks
	subscribe to tinkerforge/callback/ambient_light_v2_bricklet/XYZ/illuminance
	publish '{"register": true}' to tinkerforge/register/ambient_light_v2_bricklet/XYZ/illuminance # Register illuminance callback
	
	# Set period for illuminance callback to 1s (1000ms)
	# Note: The illuminance callback is only called every second
	#       if the illuminance has changed since the last call!
	publish '{"period": 1000}' to tinkerforge/request/ambient_light_v2_bricklet/XYZ/set_illuminance_callback_period
