But as you can see moving the slider isn’t resulting in the light dim to 0
So it is working but it is not following the slider, meaning turning on the switch the state for example is on (brightness=100%) the slider can still be in the left position (brightness=0%)
I don’t think you can turn on a light with brightness set to 0, that would be turning it off and you can’t turn off a light with a brightness attribute. I also can’t see any code to set the brightness slider from the state of the light brightness.
And now it is responding to the slider, moving the slider to the right is turning on the button and increases the brightness. However when the light is turned off with the button the slider doesn’t move all the way left. Do you have any idea, I don’t have a lot of Python experience?
When you turn off the light there is no brightness component so you would have to change the slider yourself. Use an automation to trigger on the state change of the light to off and action to set the input_number to 0.