Use notifications to get the luxometer value.
192960
function enableLuxometerNotifications(device, configCharacteristic, dataCharacteristic)
{
	// Turn Luxometer ON.
	evothings.ble.writeCharacteristic(
		device,
		configCharacteristic,
		new Uint8Array([1]),
		onLuxometerActivated,
		onLuxometerActivatedError)

	function onLuxometerActivated()
	{
		showMessage('Luxometer is ON')

		// Enable notifications from the Luxometer.
		evothings.ble.enableNotification(
			device,
			dataCharacteristic,
			onLuxometerNotification,
			onLuxometerNotificationError)
	}

	function onLuxometerActivatedError(error)
	{
		showMessage('Luxometer activate error: ' + error)
	}

	// Called repeatedly until disableNotification is called.
	function onLuxometerNotification(data)
	{
		var lux = calculateLux(data)
		showMessage('Luxometer value: ' + lux)
	}

	function onLuxometerNotificationError(error)
	{
		showMessage('Luxometer notification error: ' + error)
	}
}
138134
function getLux(volMeasured) {
  var lux;

  lux = parseInt(volMeasured, 10);

  lux = 2.3 * lux - 3200;
  lux = lux >= 0 ? lux : 0;

  return lux;
}
675344
def get(self):
        """"""
        if self.timer() > self.deadline:
            self.value = None
        return self.value
235201
def selection_notification(self, model, property, info):
        """"""
        if model is not self.current_state_machine_m or len(self.current_state_machine_m.ongoing_complex_actions) > 0:
            return
        state_machine_m = model
        assert isinstance(state_machine_m.selection, Selection)
        if len(state_machine_m.selection.states) == 1 and len(state_machine_m.selection) == 1:
            self.activate_state_tab(state_machine_m.selection.get_selected_state())
899917
function getNotificationValue() {
        if (action == "true") {
            if (actionText == null) {
                return "<div class='pmd-alert' data-action='true'>" + dataMessage + "<a href='javascript:void(0)' class='pmd-alert-close' onclick='(" + actionCallback + ")()'>×</a></div>";
            } else {
                return "<div class='pmd-alert' data-action='true'>" + dataMessage + "<a href='javascript:void(0)' class='pmd-alert-close' onclick='(" + actionCallback + ")()'>" + actionText + "</a></div>";
            }
        } else {
            if (actionText == null) {
                return "<div class='pmd-alert' data-action='false'>" + dataMessage + "</div>";
            } else {
                return "<div class='pmd-alert' data-action='true'>" + dataMessage + "<a href='javascript:void(0)' class='pmd-alert-close'>" + actionText + "</a></div>";
            }
        }
    }
1348940
private void notifyListenersIfUninhibited(R oldValue, R newValue) {
        if (inhibited) {
            inhibitCount++;
            lastInhibitedValue = newValue;
        } else {
            lastInhibitedValue = newValue; // Just in case, even though not really necessary
            lastNonInhibitedValue = newValue;
            doNotifyListeners(oldValue, newValue);
        }
    }
159958
def notify(self, reading):
        """"""
        # copy list before iterating in case new observers arrive
        for o in list(self._observers):
            o.update(self, reading)
1056597
def acknowledge_gnome_notification():
    
    x0, y0 = mouse_pos()
    mouse_move(10000, 10000)  # TODO: What if the screen is larger? Loop until mouse position does not change anymore?
    x, y = mouse_pos()
    mouse_rmove(-x/2, 0)
    mouse_click(LEFT)
    time.sleep(.2)
    mouse_move(x0, y0)
891197
def _on_notification(self, name, args):
        """"""
        if IS_PYTHON3:
            name = decode_if_bytes(name)
        handler = self._notification_handlers.get(name, None)
        if not handler:
            msg = self._missing_handler_error(name, 'notification')
            error(msg)
            self._on_async_err(msg + "\n")
            return

        debug('calling notification handler for "%s", args: "%s"', name, args)
        handler(*args)
705303
function startLuxometerNotifications()
{
	showMessage('Scanning...')

	bleat.requestDevice(
	{
		filters:[{ name: 'CC2650 SensorTag' }]
	})
	.then(function(device)
	{
		showMessage('Found device: ' + device.name)
		return device.gatt.connect()
	})
	.then(function(server)
	{
		gattServer = server
		showMessage('Connected')
		return gattServer.getPrimaryService(LUXOMETER_SERVICE)
	})
	.then(function(service)
	{
		// Get config characteristic.
		luxometerService = service
		return luxometerService.getCharacteristic(LUXOMETER_CONFIG)
	})
	.then(function(characteristic)
	{
		// Turn luxometer config to ON.
		return characteristic.writeValue(new Uint8Array([1]))
	})
	.then(function()
	{
		// Get data characteristic.
		return luxometerService.getCharacteristic(LUXOMETER_DATA)
	})
	.then(function(characteristic)
	{
		// Start sensor notification.
		showMessage('Starting notfications')
		characteristic.addEventListener('characteristicvaluechanged', onLuxometerChanged)
  		return characteristic.startNotifications()
	})
	.catch(function(error)
	{
		showMessage(error)
	})
}
1240102
def get_status_display(self, **kwargs):
        
        if 'value' in kwargs:
            value = kwargs['value']
        else:
            value = self.status

        if self.show_stdev_seconds:
            stdev = self.stdev(self.show_stdev_seconds)
            return f'{value}±{stdev:2.2}'
        else:
            return str(value)
184552
function calculateLux(data)
{
	// Get 16 bit value from data buffer in little endian format.
	var value = data.getUint16(0, true)

	// Extraction of luxometer value, based on sfloatExp2ToDouble
	// from BLEUtility.m in Texas Instruments TI BLE SensorTag
	// iOS app source code.
	var mantissa = value & 0x0FFF
	var exponent = value >> 12

	var magnitude = Math.pow(2, exponent)
	var output = (mantissa * magnitude)

	var lux = output / 100.0

	// Return result.
	return lux
}
1012602
def getMonitors(self, apikey, monitors='none'):
        """"""
        data= 'api_key=' + apikey + '&format=json'
        if monitors != 'none':
            data += '&monitors=' + monitors
        fetchUrl = self.BASE_URL
        fetchUrl += 'getMonitors'
        try:
            monitors = requests.post(fetchUrl,
                headers=self.headers, data=data, timeout=3)
        except:
            return False
        else:
            if monitors:
                return monitors.json()
            else:
                return False
272882
def inform(self, reading):
        """"""
        try:
            self._inform_callback(self._sensor, reading)
        except Exception:
            log.exception('Unhandled exception trying to send {!r} '
                          'for sensor {!r} of type {!r}'
                          .format(reading, self._sensor.name, self._sensor.type))
165346
def confirm_value(self, widget, x, y):
        
        self.gauge.onmousedown(self.gauge, x, y)
        params = (self.gauge.value)
        return params
204476
def notify(self, value: Any) -> asyncio.Future:
        
        if self._state == value:
            return None

        self._state = value
        return Publisher.notify(self, value)
46225
def read_value(self):
        """"""
        if self.gain == 1 or self.gain == 16:
            self.set_gain(self.gain)
            ambient = self.read_full()
            ir_reading = self.read_ir()
        elif self.gain == 0:
            self.set_gain(16)
            ambient = self.read_full()
            if ambient < 65535:
                ir_reading = self.read_ir()
            if ambient >= 65535 or ir_reading >= 65535:
                self.set_gain(1)
                ambient = self.read_full()
                ir_reading = self.read_ir()

        if self.gain == 1:
            ambient *= 16
            ir_reading *= 16

        if ambient == 0:
            ratio = 0
        else:
            ratio = (ir_reading / float(ambient))

        if (ratio >= 0) & (ratio <= 0.52):
            lux = (0.0315 * ambient) - (0.0593 * ambient * (ratio**1.4))
        elif ratio <= 0.65:
            lux = (0.0229 * ambient) - (0.0291 * ir_reading)
        elif ratio <= 0.80:
            lux = (0.0157 * ambient) - (0.018 * ir_reading)
        elif ratio <= 1.3:
            lux = (0.00338 * ambient) - (0.0026 * ir_reading)
        elif ratio > 1.3:
            lux = 0

        return lux