Set brightness based on variable

is this possible? I can capture the current brightness level of a light to a variable but I cannot figure out how to use the variable to set a light level. Thanks in advance.

Please post the code that shows how you “capture the current brightness level of a light to a variable”. (Use the </> Preformatted Text option).

I am pretty sure this will capture it…but I haven’t tried it yet.

This is a question about Apple’s (unfortunately awful) Shortcuts app, not Home Assistant…

Oops, sorry. I thought this was a HomeKit forum.