Add args to Node Red

Tags: #<Tag:0x00007f739f297e98>

I am trying to use Node Red to control a Hue Dimmer as a switch. I can get it to work using automatons in HA but I have to create a different automation for each button. I can get all the buttons to work in NR but the two middle buttons zha events are both step. I can use the “args” in HA automation but can’t figure out how to add the args in NR. Here is how my HA automation is setup.

- id: '12'
  alias: Countertops Blue
  description: ''
  trigger:
  - event_data:
      args:
      - 0
      - 30
      - 9
      command: step
      device_ieee: 00:17:88:01:02:d6:99:b7
    event_type: zha_event
    platform: event
  condition: []
  action:
  - data:
      brightness_pct: 35
      rgb_color:
      - 0
      - 0
      - 255
    entity_id: light.counter_1
    service: light.turn_on
  - data:
      brightness_pct: 35
      rgb_color:
      - 0
      - 0
      - 255
    entity_id: light.counter_2
    service: light.turn_on
  - data:
      brightness_pct: 35
      rgb_color:
      - 0
      - 0
      - 255
    entity_id: light.counter_3
    service: light.turn_on

Thanks a million that worked. I now have NR working the way I want it.

I only see your original post and this one… Am I missing something? Curious how you solved this :joy:

1 Like

Could you share the solution?

Thanks much

its been a while since I set that up. Let me know what you are trying to do and I can try to point you in the right direction. Since this post I have stopped using the hue remotes and are using some other remotes now. I didn’t have a problem with the hue remotes but I figured that since I still have the hue hub it was better to use those with my hue bridge. I am currently using Smarthings Button, ERIA, and Eco Smart from Homedepot. I got the Eco Smarts on sale for $8.99 which came with a bulb and remote.

Here is the code from a hue switch I still have setup. I forgot about this one. If search for “args” you can see the code.

[{"id":"7346b35.4c2564c","type":"subflow","name":"Subflow 5","info":"","in":[],"out":[]},{"id":"629f6a7b.9fb974","type":"server-state-changed","z":"7346b35.4c2564c","name":"Office Lights Tap","server":"e61ee5a8.572ae8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"remote.office_tap","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":200,"y":180,"wires":[["3d46d42a.6c003c"]]},{"id":"3d46d42a.6c003c","type":"switch","z":"7346b35.4c2564c","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1_click","vt":"str"},{"t":"eq","v":"2_click","vt":"str"},{"t":"eq","v":"3_click","vt":"str"},{"t":"eq","v":"4_click","vt":"str"}],"checkall":"true","repair":false,"outputs":4,"x":370,"y":180,"wires":[["435b773c.f193b8"],["9198e018.dfc5f"],["73899673.eb05d8"],["45b62e76.37ec7"]]},{"id":"73899673.eb05d8","type":"api-call-service","z":"7346b35.4c2564c","name":"Office Bed","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.office_bed","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":710,"y":200,"wires":[[]]},{"id":"45b62e76.37ec7","type":"api-call-service","z":"7346b35.4c2564c","name":"Desk Light","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.desk_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":710,"y":260,"wires":[[]]},{"id":"435b773c.f193b8","type":"api-call-service","z":"7346b35.4c2564c","name":"Office Off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.office_bed, light.office_desk, light.desk_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":80,"wires":[[]]},{"id":"9198e018.dfc5f","type":"api-call-service","z":"7346b35.4c2564c","name":"Office Desk","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.office_desk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":710,"y":140,"wires":[[]]},{"id":"2fe4ca78.920e76","type":"subflow","name":"Theater Button","info":"","category":"","in":[],"out":[],"env":[],"color":"#DDAA99"},{"id":"17b77d65.d00e23","type":"server-events","z":"2fe4ca78.920e76","name":"ZHA Event","server":"e61ee5a8.572ae8","event_type":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":220,"y":200,"wires":[["22198925.9b5876"]]},{"id":"22198925.9b5876","type":"switch","z":"2fe4ca78.920e76","name":"Theater Button","property":"payload.event.device_ieee","propertyType":"msg","rules":[{"t":"eq","v":"28:6d:97:00:01:0a:39:fb","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":200,"y":140,"wires":[["f61b6387.74fed"]]},{"id":"f61b6387.74fed","type":"switch","z":"2fe4ca78.920e76","name":"","property":"payload.event.command","propertyType":"msg","rules":[{"t":"eq","v":"button_single","vt":"str"},{"t":"eq","v":"button_double","vt":"str"},{"t":"eq","v":"button_hold","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":490,"y":140,"wires":[["38644246.67d12e"],["1048a33d.25c06d"],["ec405c4f.f4b84"]]},{"id":"38644246.67d12e","type":"api-call-service","z":"2fe4ca78.920e76","name":"Couch Accents","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.couch_accent","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":80,"wires":[[]]},{"id":"ec405c4f.f4b84","type":"api-call-service","z":"2fe4ca78.920e76","name":"Subwoofers","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"switch","service":"toggle","entityId":"switch.sub_1, switch.sub_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":690,"y":200,"wires":[[]]},{"id":"1048a33d.25c06d","type":"api-call-service","z":"2fe4ca78.920e76","name":"Theater Lights","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.theater_lights","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":700,"y":140,"wires":[[]]},{"id":"e47b7564.6339c8","type":"subflow","name":"Office Remote","info":"","category":"","in":[],"out":[],"env":[],"color":"#DDAA99"},{"id":"52112a38.bc8de4","type":"server-events","z":"e47b7564.6339c8","name":"ZHA Event","server":"e61ee5a8.572ae8","event_type":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":200,"y":320,"wires":[["43f075.9912bf8c"]]},{"id":"43f075.9912bf8c","type":"switch","z":"e47b7564.6339c8","name":"","property":"payload.event.device_ieee","propertyType":"msg","rules":[{"t":"eq","v":"cc:cc:cc:ff:fe:d4:d8:b7","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":430,"y":320,"wires":[["325530c0.dd321"]]},{"id":"325530c0.dd321","type":"switch","z":"e47b7564.6339c8","name":"","property":"payload.event.command","propertyType":"msg","rules":[{"t":"eq","v":"move_to_level_with_on_off","vt":"str"},{"t":"eq","v":"move_to_color_temp","vt":"str"},{"t":"eq","v":"move_to_level","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"on","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":670,"y":320,"wires":[["397e383e.e27ef8"],["3d7cc3d0.a178dc"],["1b0f165b.66da7a"],["ab5d565b.a21568"],["5d9ac44e.7629fc"]]},{"id":"1b0f165b.66da7a","type":"api-call-service","z":"e47b7564.6339c8","name":"Desk Light","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.desk_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":320,"wires":[[]]},{"id":"3d7cc3d0.a178dc","type":"api-call-service","z":"e47b7564.6339c8","name":"Office Desk","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.office_desk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":260,"wires":[[]]},{"id":"397e383e.e27ef8","type":"api-call-service","z":"e47b7564.6339c8","name":"Office Bed","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.office_bed","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":200,"wires":[[]]},{"id":"ab5d565b.a21568","type":"api-call-service","z":"e47b7564.6339c8","name":"Switches Off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_off","entityId":"switch.office_fan, switch.office_warmer","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":380,"wires":[[]]},{"id":"5d9ac44e.7629fc","type":"api-call-service","z":"e47b7564.6339c8","name":"Switches On","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"switch","service":"turn_on","entityId":"switch.office_fan, switch.office_warmer","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1130,"y":440,"wires":[[]]},{"id":"49a2087e.188c08","type":"subflow","name":"Office Dimmer","info":"","category":"","in":[],"out":[],"env":[],"color":"#DDAA99"},{"id":"cbce38a5.1e34b8","type":"server-state-changed","z":"49a2087e.188c08","name":"Office Switch","server":"e61ee5a8.572ae8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"remote.office_switch","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":190,"y":360,"wires":[["977445a.83686b8"]]},{"id":"977445a.83686b8","type":"switch","z":"49a2087e.188c08","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1_click_up","vt":"str"},{"t":"eq","v":"1_hold_up","vt":"str"},{"t":"eq","v":"2_click_up","vt":"str"},{"t":"eq","v":"2_hold_up","vt":"str"},{"t":"eq","v":"3_click_up","vt":"str"},{"t":"eq","v":"3_hold_up","vt":"str"},{"t":"eq","v":"4_click_up","vt":"str"},{"t":"eq","v":"4_hold_up","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":510,"y":360,"wires":[["710bb367.f451cc"],["d661fb5c.63fe88"],["f40d14a6.da1118"],["8f345f5b.220ef"],["952543dc.a345f"],["81674737.6b45e8"],["e2ef3fed.7772c"],[]]},{"id":"710bb367.f451cc","type":"api-call-service","z":"49a2087e.188c08","name":"office on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"scene","service":"turn_on","entityId":"scene.office_bright","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":780,"y":80,"wires":[["bfa396dd.fd7998"]]},{"id":"d661fb5c.63fe88","type":"api-call-service","z":"49a2087e.188c08","name":"Counter 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.office_bed, light.office_desk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":160,"wires":[["412a0b5.0743ef4"]]},{"id":"f40d14a6.da1118","type":"api-call-service","z":"49a2087e.188c08","name":"Counter 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.office_bed, light.office_desk","data":"{\"brightness_pct\":30,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":220,"wires":[[]]},{"id":"8f345f5b.220ef","type":"api-call-service","z":"49a2087e.188c08","name":"Red 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.office_bed, light.office_desk","data":"{\"brightness_pct\":60,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":780,"y":300,"wires":[[]]},{"id":"952543dc.a345f","type":"api-call-service","z":"49a2087e.188c08","name":"Counter 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.office_bed, light.office_desk","data":"{\"brightness_pct\":30,\"rgb_color\":[0,0,255]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":790,"y":380,"wires":[[]]},{"id":"81674737.6b45e8","type":"api-call-service","z":"49a2087e.188c08","name":"office off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.office_bed, light.office_desk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":780,"y":460,"wires":[["490f3743.caccf8"]]},{"id":"e2ef3fed.7772c","type":"api-call-service","z":"49a2087e.188c08","name":"office off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.office_bed, light.office_desk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":780,"y":540,"wires":[["ec940d97.6e103"]]},{"id":"bfa396dd.fd7998","type":"debug","z":"49a2087e.188c08","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1230,"y":80,"wires":[]},{"id":"412a0b5.0743ef4","type":"debug","z":"49a2087e.188c08","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1210,"y":160,"wires":[]},{"id":"ec940d97.6e103","type":"debug","z":"49a2087e.188c08","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1196,"y":544,"wires":[]},{"id":"490f3743.caccf8","type":"debug","z":"49a2087e.188c08","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1205,"y":468,"wires":[]},{"id":"3887d13.47c242e","type":"subflow","name":"Master Bedroom Remote","info":"","category":"","in":[],"out":[],"env":[],"color":"#DDAA99"},{"id":"9b32fb.77d64d08","type":"server-events","z":"3887d13.47c242e","name":"ZHA Event","server":"e61ee5a8.572ae8","event_type":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":120,"y":440,"wires":[["2283dadc.1cff16"]]},{"id":"27d40835.10bd88","type":"switch","z":"3887d13.47c242e","name":"","property":"payload.event.command","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off","vt":"str"},{"t":"eq","v":"move_to_level","vt":"str"},{"t":"eq","v":"move_to_color_temp","vt":"str"},{"t":"eq","v":"move_to_level_with_on_off","vt":"str"}],"checkall":"true","repair":false,"outputs":5,"x":590,"y":440,"wires":[["d47022ae.ee977"],["9fa353ef.beff7"],["689f6d86.88d9f4"],["5a52c47a.6cf25c"],["e0ecb146.0ad7f"]]},{"id":"d47022ae.ee977","type":"api-call-service","z":"3887d13.47c242e","name":"Master Bedroom On","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"scene","service":"turn_on","entityId":"scene.master_bedroom_on","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1100,"y":200,"wires":[[]]},{"id":"9fa353ef.beff7","type":"api-call-service","z":"3887d13.47c242e","name":"Master Bedroom Off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"scene","service":"turn_on","entityId":"scene.master_bedroom_off","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1100,"y":280,"wires":[[]]},{"id":"2283dadc.1cff16","type":"switch","z":"3887d13.47c242e","name":"","property":"payload.event.device_ieee","propertyType":"msg","rules":[{"t":"cont","v":"cc:cc:cc:ff:fe:c1:1c:c5","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":350,"y":440,"wires":[["27d40835.10bd88"]]},{"id":"e0ecb146.0ad7f","type":"api-call-service","z":"3887d13.47c242e","name":"All Lights off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.master_bedroom, light.bed_lamp_1, light.bed_lamp_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":600,"wires":[["44bf5af.461e7a4"]]},{"id":"5a52c47a.6cf25c","type":"api-call-service","z":"3887d13.47c242e","name":"Bed Lamp 2","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.bed_lamp_2","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1073,"y":488,"wires":[[]]},{"id":"689f6d86.88d9f4","type":"api-call-service","z":"3887d13.47c242e","name":"Bed Lamp 1","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.bed_lamp_1","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1070,"y":380,"wires":[[]]},{"id":"44bf5af.461e7a4","type":"api-call-service","z":"3887d13.47c242e","name":"Alarm On","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"alarm_control_panel","service":"alarm_arm_home","entityId":"alarm_control_panel.ring_alarm","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1060,"y":660,"wires":[[]]},{"id":"b35b2b76.934e78","type":"subflow","name":"Counter Top Remote","info":"","category":"","in":[],"out":[],"env":[],"color":"#DDAA99"},{"id":"8c0bc57e.854d58","type":"server-state-changed","z":"b35b2b76.934e78","name":"Counter Top Lights","server":"e61ee5a8.572ae8","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"remote.counter_top_switch","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"","halt_if_type":"str","halt_if_compare":"is","outputs":1,"output_only_on_state_change":true,"x":190,"y":360,"wires":[["1a9c15e7.6e2b8a"]]},{"id":"1a9c15e7.6e2b8a","type":"switch","z":"b35b2b76.934e78","name":"Switch","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"1_click_up","vt":"str"},{"t":"eq","v":"1_hold_up","vt":"str"},{"t":"eq","v":"2_click_up","vt":"str"},{"t":"eq","v":"2_hold_up","vt":"str"},{"t":"eq","v":"3_click_up","vt":"str"},{"t":"eq","v":"3_hold_up","vt":"str"},{"t":"eq","v":"4_click_up","vt":"str"},{"t":"eq","v":"4_hold_up","vt":"str"}],"checkall":"true","repair":false,"outputs":8,"x":490,"y":360,"wires":[["777ccab9.690884"],["a283b6af.885f58"],["caf70ffc.699a8"],["4fc5e30c.7c9dac"],["ca4696b.cd68368"],["9982794f.b0b218"],["8b6c6b99.815d48"],[]]},{"id":"777ccab9.690884","type":"api-call-service","z":"b35b2b76.934e78","name":"White 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.counter_1, light.counter_2, light.counter_3","data":"{\"brightness_pct\":90,\"rgb_color\":[255,255,255]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":80,"wires":[[]]},{"id":"8b6c6b99.815d48","type":"api-call-service","z":"b35b2b76.934e78","name":"Counter 1 off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_off","entityId":"light.counter_1, light.counter_2, light.counter_3","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":540,"wires":[[]]},{"id":"caf70ffc.699a8","type":"api-call-service","z":"b35b2b76.934e78","name":"Counter 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.counter_1, light.counter_2, light.counter_3","data":"{\"brightness_pct\":30,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":220,"wires":[[]]},{"id":"ca4696b.cd68368","type":"api-call-service","z":"b35b2b76.934e78","name":"Counter 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.counter_1, light.counter_2, light.counter_3","data":"{\"brightness_pct\":30,\"rgb_color\":[0,0,255]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":380,"wires":[[]]},{"id":"a283b6af.885f58","type":"api-call-service","z":"b35b2b76.934e78","name":"Counter 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.counter_1, light.counter_2, light.counter_3","data":"{\"brightness_pct\":30,\"rgb_color\":[255,0,255]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":160,"wires":[[]]},{"id":"4fc5e30c.7c9dac","type":"api-call-service","z":"b35b2b76.934e78","name":"Red 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.counter_1, light.counter_2, light.counter_3","data":"{\"brightness_pct\":60,\"rgb_color\":[255,0,0]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":760,"y":300,"wires":[["97da9b35.964858"]]},{"id":"97da9b35.964858","type":"api-call-service","z":"b35b2b76.934e78","name":"Green 2 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.counter_2","data":"{\"brightness_pct\":30,\"rgb_color\":[0,255,0]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":990,"y":300,"wires":[["a972e2e3.327b"]]},{"id":"a972e2e3.327b","type":"api-call-service","z":"b35b2b76.934e78","name":"Blue 3 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.counter_3","data":"{\"brightness_pct\":30,\"rgb_color\":[0,0,255]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":1200,"y":300,"wires":[[]]},{"id":"9982794f.b0b218","type":"api-call-service","z":"b35b2b76.934e78","name":"Counter 1 on","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"turn_on","entityId":"light.counter_1, light.counter_2, light.counter_3","data":"{\"brightness_pct\":30,\"rgb_color\":[226,4,159]}","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":770,"y":460,"wires":[[]]},{"id":"e61ee5a8.572ae8","type":"server","z":"","name":"Home Assistant","legacy":false,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true},{"id":"5867d6e1.5be778","type":"tab","label":"Remotes","disabled":false,"info":""},{"id":"49c28b3c.681c14","type":"subflow:b35b2b76.934e78","z":"5867d6e1.5be778","x":90,"y":20,"wires":[]},{"id":"45794137.5bd79","type":"subflow:3887d13.47c242e","z":"5867d6e1.5be778","name":"","env":[],"x":110,"y":60,"wires":[]},{"id":"e76679d2.c59c98","type":"subflow:49a2087e.188c08","z":"5867d6e1.5be778","name":"Office Switch","env":[],"x":70,"y":140,"wires":[]},{"id":"8839cab4.accb38","type":"subflow:e47b7564.6339c8","z":"5867d6e1.5be778","name":"","env":[],"x":70,"y":100,"wires":[]},{"id":"127d28b8.46ccb7","type":"subflow:2fe4ca78.920e76","z":"5867d6e1.5be778","name":"","env":[],"x":80,"y":220,"wires":[]},{"id":"90d178de.74b038","type":"subflow:7346b35.4c2564c","z":"5867d6e1.5be778","name":"Office Tap","env":[],"x":60,"y":180,"wires":[]},{"id":"602998c0.bfeb28","type":"server-events","z":"5867d6e1.5be778","name":"ZHA Event","server":"e61ee5a8.572ae8","event_type":"zha_event","exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"x":60,"y":540,"wires":[["a09be743.226e88"]]},{"id":"a09be743.226e88","type":"switch","z":"5867d6e1.5be778","name":"","property":"payload.event.device_ieee","propertyType":"msg","rules":[{"t":"eq","v":"00:17:88:01:08:07:c6:5f","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":290,"y":540,"wires":[["3547abe4.4007b4","1c25535.8d2cead"]]},{"id":"9dc76f4d.7243","type":"api-call-service","z":"5867d6e1.5be778","name":"Office Bed","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.office_bed","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":990,"y":420,"wires":[["27aab2f3.9031de"]]},{"id":"c93ae15.f411d2","type":"api-call-service","z":"5867d6e1.5be778","name":"Office Desk","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.office_desk","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":990,"y":540,"wires":[["a7edc8c9.402c98"]]},{"id":"5aad5798.990f68","type":"api-call-service","z":"5867d6e1.5be778","name":"Desk Light","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"light","service":"toggle","entityId":"light.desk_light","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":990,"y":600,"wires":[["bb8338ce.ac9208"]]},{"id":"5f90d613.fc7858","type":"api-call-service","z":"5867d6e1.5be778","name":"Switches Off","server":"e61ee5a8.572ae8","version":1,"debugenabled":false,"service_domain":"switch","service":"toggle","entityId":"switch.office_fan, switch.office_warmer","data":"","dataType":"json","mergecontext":"","output_location":"","output_location_type":"none","mustacheAltTags":false,"x":990,"y":480,"wires":[["e1867eb5.d76df"]]},{"id":"e1867eb5.d76df","type":"debug","z":"5867d6e1.5be778","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1230,"y":480,"wires":[]},{"id":"a7edc8c9.402c98","type":"debug","z":"5867d6e1.5be778","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1230,"y":540,"wires":[]},{"id":"bb8338ce.ac9208","type":"debug","z":"5867d6e1.5be778","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1230,"y":600,"wires":[]},{"id":"27aab2f3.9031de","type":"debug","z":"5867d6e1.5be778","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1230,"y":420,"wires":[]},{"id":"3547abe4.4007b4","type":"switch","z":"5867d6e1.5be778","name":"commands","property":"payload.event.command","propertyType":"msg","rules":[{"t":"eq","v":"on","vt":"str"},{"t":"eq","v":"off_with_effect","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":460,"wires":[["9dc76f4d.7243"],["5f90d613.fc7858"]]},{"id":"1c25535.8d2cead","type":"switch","z":"5867d6e1.5be778","name":"args","property":"payload.event.args","propertyType":"msg","rules":[{"t":"cont","v":"0,30,9","vt":"str"},{"t":"cont","v":"1,30,9","vt":"str"},{"t":"cont","v":"0,56,9","vt":"str"}],"checkall":"true","repair":false,"outputs":3,"x":570,"y":560,"wires":[["c93ae15.f411d2"],["5aad5798.990f68"],[]]}]```

Thanks. I have finally managed to track the dimmer steps with the following JSON expression:

msg.payload.event.args=[0,30,9]