Brightness_pct can be used to set the brightness, but it’s not exposed as an attribute so you’d have to use brightness which is an integer from 1 to 255.
So basically if you’re saying that 100% (brightness 255) should equal 10, then presumably 50% should equal 5, so I think (in my slightly sleepy state) the formula would be to multiply the brightness level by 10 and divide by 255.
I can’t work out off the top of my head whether that will always return a round number so you might need to round the decimal points in the output
Also if ‘10’ is a changeable number you could swap that out for the state of an input_number, and update the input number whenever you need to adjust the calculation.
Anyway, hopefully this gets you most, if not all, the way there.