Issues with configuring Namron Z-wave switch to Z-wave dimmer

Hi!

I am having some issued with configuring a Namron dimmer to a Namron 4ch switch.

I have tried to set it up via Automations with the folling YAML:

alias: Bryter bad gang
description: Bryter til bad som står i gangen
trigger:
  - platform: device
    device_id: device_id
    domain: zwave_js
    type: event.value_notification.central_scene
    property: scene
    property_key: "001"
    endpoint: 0
    command_class: 91
    subtype: Endpoint 0 Scene 001
    value: 2
    id: dim-up
  - platform: device
    device_id: device_id
    domain: zwave_js
    type: event.value_notification.central_scene
    property: scene
    property_key: "002"
    endpoint: 0
    command_class: 91
    subtype: Endpoint 0 Scene 002
    id: dim-down
    value: 2
  - platform: device
    device_id: device_id
    domain: zwave_js
    type: event.value_notification.central_scene
    property: scene
    property_key: "001"
    endpoint: 0
    command_class: 91
    subtype: Endpoint 0 Scene 001
    value: 1
    id: dim-up-release
  - platform: device
    device_id: device_id
    domain: zwave_js
    type: event.value_notification.central_scene
    property: scene
    property_key: "002"
    endpoint: 0
    command_class: 91
    subtype: Endpoint 0 Scene 002
    value: 1
    id: dim-down-release
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: dim-up
        sequence:
          - repeat:
              while:
                - condition: trigger
                  id: dim-up
              sequence:
                - device_id: device_id
                  domain: light
                  entity_id: light.dimmer_bad_1_etg
                  type: brightness_increase
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 500
      - conditions:
          - condition: trigger
            id: dim-down
        sequence:
          - repeat:
              while:
                - condition: trigger
                  id: dim-down
              sequence:
                - device_id: device_id
                  domain: light
                  entity_id: light.dimmer_bad_1_etg
                  type: brightness_decrease
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 500
mode: restart

However, when I hold switch 1 or 2 down it does not change the brightness until I release the buttons. And when I release it only dims it one step. no matter how long I am hold the buttons.

I followed this guide on YT

I must be doing something wrong here, but I can not figure out what it is.

Any help is appreciated!

Condition is while trigger. Maybe it only triggers once.

I use a 2-channel Namron dimmer to control two seperate Namron dimmers. This is my working automation:

alias: dim lights
description: ""
trigger:
  - platform: device
    domain: mqtt
    device_id: b3bc085725c505a4957b675cffcc6dcf
    type: action
    subtype: brightness_move_up_l2
    discovery_id: 0xccccccfffe6443d1 action_brightness_move_up_l2
    id: dim-up-l2
  - platform: device
    domain: mqtt
    device_id: b3bc085725c505a4957b675cffcc6dcf
    type: action
    subtype: brightness_move_down_l2
    discovery_id: 0xccccccfffe6443d1 action_brightness_move_down_l2
    id: dim-down-l2
  - platform: device
    domain: mqtt
    device_id: b3bc085725c505a4957b675cffcc6dcf
    type: action
    subtype: brightness_stop_l2
    discovery_id: 0xccccccfffe6443d1 action_brightness_stop_l2
    id: stop-l2
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: dim-up-l2
        sequence:
          - repeat:
              while:
                - condition: trigger
                  id: dim-up-l2
              sequence:
                - service: light.turn_on
                  data:
                    brightness_step: 5
                  target:
                    entity_id: light.dimmer_tak_stue
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 200
      - conditions:
          - condition: trigger
            id: dim-down-l2
        sequence:
          - repeat:
              while:
                - condition: trigger
                  id: dim-down-l2
              sequence:
                - service: light.turn_on
                  data:
                    brightness_step: -5
                  target:
                    entity_id: light.dimmer_tak_stue
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 200
mode: restart

Thank you for the reply. I think I have comapred your YAML in a previous post you made, and I can not see any differences other than you are using Zigbee.

I also have a trigger-id for the release action after holding.

I think that this is needed for the action to be repeated as long as I am holdning the button down.