This is part of my flow
It's controlled from a switch but if you combine it with the buttons I did in this project
https://flows.nodered.org/flow/4b3f2cd44ebfa4689ec13c34dc576d56 see how you go.
[{"id":"90060fee.df85e8","type":"hue-light","z":"1178ee8c.0984a9","name":"Living Room","bridge":"8b347d00.5d7e4","lightid":"2","colornamer":true,"skipevents":false,"x":630,"y":140,"wires":[["b0a4e5a0.48cfd"]]},{"id":"9c85eb9.ef02618","type":"ui_slider","z":"1178ee8c.0984a9","name":"","label":"","tooltip":"","group":"98d5dae6.05357","order":3,"width":"5","height":"1","passthru":false,"outs":"all","topic":"","min":0,"max":"100","step":"5","x":270,"y":200,"wires":[["2d9a45ce.2ddaf2","7821abc4.fbe74c"]]},{"id":"2d9a45ce.2ddaf2","type":"function","z":"1178ee8c.0984a9","name":"Brightness","func":"return {payload: { brightness: msg.payload } };","outputs":1,"noerr":0,"x":410,"y":200,"wires":[["90060fee.df85e8"]]},{"id":"fc1f0f74.4c5c28","type":"ui_switch","z":"1178ee8c.0984a9","name":"","label":"","tooltip":"","group":"98d5dae6.05357","order":2,"width":1,"height":1,"passthru":false,"decouple":"true","topic":"","style":"","onvalue":"true","onvalueType":"bool","onicon":"","oncolor":"","offvalue":"false","offvalueType":"bool","officon":"","offcolor":"","x":270,"y":140,"wires":[["90060fee.df85e8"]]},{"id":"b0a4e5a0.48cfd","type":"link out","z":"1178ee8c.0984a9","name":"","links":["ba3aec13.334c1"],"x":795,"y":140,"wires":[]},{"id":"87a2aacc.b2f3c8","type":"function","z":"1178ee8c.0984a9","name":"splitter","func":"return [\n { payload: msg.payload.on },\n { payload: msg.payload.brightness }\n];","outputs":2,"noerr":0,"x":130,"y":160,"wires":[["fc1f0f74.4c5c28"],["9c85eb9.ef02618"]]},{"id":"ba3aec13.334c1","type":"link in","z":"1178ee8c.0984a9","name":"","links":["b0a4e5a0.48cfd"],"x":35,"y":160,"wires":[["87a2aacc.b2f3c8"]]},{"id":"8f902501.c4af18","type":"comment","z":"1178ee8c.0984a9","name":"Lighting Control","info":"","x":100,"y":100,"wires":[]},{"id":"7821abc4.fbe74c","type":"ui_text","z":"1178ee8c.0984a9","group":"98d5dae6.05357","order":1,"width":0,"height":0,"name":"Level","label":"Living Room","format":"{{msg.payload}}","layout":"row-spread","x":390,"y":160,"wires":[]},{"id":"8b347d00.5d7e4","type":"hue-bridge","z":"","name":"Beaver Hue","bridge":"10.1.1.108","key":"txr199imLMnsQRFZW6t8szTvUFbAh0KxxT1Wn4zV","interval":"2000","disableupdates":false},{"id":"98d5dae6.05357","type":"ui_group","z":"","name":"Living Room","tab":"e403be4.fc56ec","order":1,"disp":false,"width":"6","collapse":false},{"id":"e403be4.fc56ec","type":"ui_tab","z":"","name":"Lighting","icon":"dashboard","order":1,"disabled":false,"hidden":false}]