         var outputCount = UInt32(1)
         var outputValues = UnsafeMutablePointer<UInt64>(malloc(1*sizeof(UInt64)))
         
-        let kr = IOConnectCallScalarMethod(dataPort, kSetLEDBrightnessID, inputValues, inputCount, outputValues, &outputCount)
+        let kr = IOConnectCallScalarMethod(dataPort, selector, inputValues, inputCount, outputValues, &outputCount)
         
         var outputs = [UInt64]()
         for i in 0..<outputCount {

    // TODO
    public var lightSensors: LightSensors? {
        get {
            return LightSensors(left: 0, right: 0)
        }
    }

        return nil
    }
    
    /**
    Set MacBook keyboard backlight brightness.

    :param: brightness A value between 0 and 1.
    
    :returns: The new brightness value that has been set. Nil if it failed.
    */
    public func setKeyboardBrightness(brightness: Float) -> Float? {
        let inputs = [UInt64(0), UInt64(brightness * 0xfff)]
        let outputs = callScalarMethod(kSetLEDBrightnessID, inputs: inputs)
