How can I change the brightness with a slider?

Issue is that only the first digit is doing anything the second digit isn’t. So its counting by tens instead of ones.