I have created an example for a dimmable led light node with an attached rotary encoder for adjustment of light level.
The sketch fades light smoothly (none blocking) and remembers the last light level when turning off light by clicking rotary button.

https://codebender.cc/sketch:106978