Hello People I'm having great trouble trying to use a potentiometer to control the brightness

Hello People

I’m having great trouble trying to use a potentiometer to control the brightness of my WS2811 LED Strips with an Arduino Uno.

My main problem is that the LED strip I am using is White only, not RGB. All I want to do is use them for lighting in my room and to be able to control the brightness with the potentiometer. Nothing I do seems to work, probably because it is relaying RGB information. This is the code I have been using without Success: https://gist.github.com/hsiboy/11545fd0241ab60b567d
I just removed the Colour and Speed Part.
The potentiometer is working, as i have tested it sending data through the serial connected to A0, so the problem doesn’t lie there.

Hopefully someone can help me!
Thanks

Maybe try setting leds[i] = CHSV(mappedHue, 255, 255);

All to the mappedHue.

255,255,255 is bright white 128,128,128 is half bright

Thanks for the Reply
Do you mean map the colour pin to the same as the brightness pin meaning it will change all three 255,255,255 values up and down?
I have tried this, but instead of brightness I just get different rates of flickering.
But if I just use a basic code, setting just the colour of the LED, and I input 255,255,255 it is bright white, and if I input 128,128,128, its half as bright, like you said. I just can’t find away to automate this with the Potentiometer!

You just need something like what’s in here, I suspect:

just read the potentiometer to get your brightness value, call FastLED.setBrightness with that value, then just show the color white on all your strips.