Not perfect, the function node could be better. Just adapt it to your setup.
[{"id":"fa7f4847.7012d8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"50c89d4.6b3f964","type":"switch","z":"fa7f4847.7012d8","name":"Messages","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"brightness_move_up","vt":"str"},{"t":"eq","v":"brightness_stop","vt":"str"},{"t":"eq","v":"brightness_move_down","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":370,"y":300,"wires":[["653b5408.e0119c"],["31dc0a62.b24f96"],["8121f340.3310a"],["4345ece6.753f14"],["beec4d61.b1991"]]},{"id":"64154b37.69d4e4","type":"mqtt in","z":"fa7f4847.7012d8","name":"IKEA switch 02","topic":"zigbee2mqtt/ikeaswitch02","qos":"1","datatype":"json","broker":"3922a6cd.ff2dca","x":180,"y":300,"wires":[["50c89d4.6b3f964"]]},{"id":"653b5408.e0119c","type":"api-call-service","z":"fa7f4847.7012d8","name":"Lights ON","server":"117b1889.920667","version":1,"debugenabled":true,"service_domain":"homeassistant","service":"turn_on","entityId":"light.bureau","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":580,"y":200,"wires":[[]]},{"id":"31dc0a62.b24f96","type":"api-call-service","z":"fa7f4847.7012d8","name":"Lights OFF","server":"117b1889.920667","version":1,"debugenabled":true,"service_domain":"homeassistant","service":"turn_off","entityId":"light.bureau","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":590,"y":240,"wires":[[]]},{"id":"e0d64368.8198b","type":"function","z":"fa7f4847.7012d8","name":"Brightness up","func":"var step = 15;\nvar brightness = flow.get(\"light_brightness\");\n\nif(brightness > 0){\n brightness = brightness + step;\n flow.set(\"light_brightness\", brightness);\n }\n\t\nif(brightness >= 255){\n brightness = 254;\n flow.set(\"light_brightness\", brightness);\n }\n\nmsg.payload = {\"brightness\":brightness}\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","x":800,"y":280,"wires":[["8f75fbe1.63ac48"]]},{"id":"fe2da65e.50e228","type":"function","z":"fa7f4847.7012d8","name":"Brightness down","func":"var step = 15;\nvar brightness = flow.get(\"light_brightness\");\n\nif(brightness <= 255){\n brightness = brightness - step; \n flow.set(\"light_brightness\", brightness);\n\t}\n\t\nif(brightness <= 0){\n brightness = 1;\n flow.set(\"light_brightness\", brightness);\n }\n\nmsg.payload = {\"brightness\":brightness}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":810,"y":400,"wires":[["8f75fbe1.63ac48"]]},{"id":"8121f340.3310a","type":"looptimer","z":"fa7f4847.7012d8","duration":"0.4","units":"Second","maxloops":"100","maxtimeout":"1","maxtimeoutunits":"Hour","name":"","x":610,"y":280,"wires":[["e0d64368.8198b"],[]]},{"id":"8f75fbe1.63ac48","type":"api-call-service","z":"fa7f4847.7012d8","name":"Lights UP or DOWN","server":"117b1889.920667","version":1,"debugenabled":true,"service_domain":"homeassistant","service":"turn_on","entityId":"light.bureau","data":"{\"brightness\":\"{{payload.brightness}}\"}","dataType":"json","mergecontext":"","output_location":"payload","output_location_type":"msg","mustacheAltTags":false,"x":820,"y":340,"wires":[[]]},{"id":"beec4d61.b1991","type":"looptimer","z":"fa7f4847.7012d8","duration":"0.4","units":"Second","maxloops":"100","maxtimeout":"1","maxtimeoutunits":"Hour","name":"","x":610,"y":400,"wires":[["fe2da65e.50e228"],[]]},{"id":"4345ece6.753f14","type":"change","z":"fa7f4847.7012d8","name":"stop","rules":[{"t":"set","p":"payload","pt":"msg","to":"stop","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":590,"y":340,"wires":[["8121f340.3310a","beec4d61.b1991"]]},{"id":"950f72d1.b84bb","type":"server-state-changed","z":"fa7f4847.7012d8","name":"Lumière bureau","server":"117b1889.920667","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"light.bureau, ","entityidfiltertype":"exact","outputinitially":true,"state_type":"str","haltifstate":"on","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":true,"x":200,"y":400,"wires":[["73dd394b.bbbbb8"],[]]},{"id":"73dd394b.bbbbb8","type":"change","z":"fa7f4847.7012d8","name":"Brightness","rules":[{"t":"move","p":"data.new_state.attributes.brightness","pt":"msg","to":"light_brightness","tot":"flow"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":440,"wires":[[]]},{"id":"3922a6cd.ff2dca","type":"mqtt-broker","name":"","broker":"192.168.2.136","port":"1883","tls":"","clientid":"","usetls":false,"compatmode":false,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""},{"id":"117b1889.920667","type":"server","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true}]