ZHA - Namron ZigBee 1,2 og4 Kanal Bryter

A simple blueprint for Namron ZigBee switches with the ZHA integration

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

blueprint:
  name: ZHA - Namron 1, 2 og 4 kanal bryter
  description: |
    Controll lights and other with Namron zigbee remote

  domain: automation
  input:
    remote:
      name: Remote
      description: Namron controller
      selector:
        device:
          integration: zha
          manufacturer: NAMRON AS

          
    channel_one_on_short:
      name: Channel one - on button - short press
      description: Action to run on short press on one on button 
      default: []
      selector:
        action:
    channel_one_on_long:
      name: Channel one - on button - long press
      description: Action to run on long press on one on button 
      default: []
      selector:
        action:    
    channel_one_on_stop:
      name: Channel one - on button - long press release
      description: Action to run on long press release on one on button 
      default: []
      selector:
        action:           
    channel_one_off_short:
      name: Channel one - off button - short press
      description: Action to run on short press on One off button 
      default: []
      selector:
        action:
    channel_one_off_long:
      name: Channel one - off button - long press
      description: Action to run on long press on One off button 
      default: []
      selector:
        action:
    channel_one_off_stop:
      name: Channel one - off button - long press release
      description: Action to run on long press release on One off button 
      default: []
      selector:
        action:
        
    channel_two_on_short:
      name: Channel two - on button - short press
      description: Action to run on short press on Two on button 
      default: []
      selector:
        action:
    channel_two_on_long:
      name: Channel two - on button - long press
      description: Action to run on long press on Two ont button 
      default: []
      selector:
        action:    
    channel_two_on_stop:
      name: Channel two - on button - long press release
      description: Action to run on long press release on Two on button 
      default: []
      selector:
        action:           
    channel_two_off_short:
      name: Channel two - off button - short press
      description: Action to run on short press on Two off button 
      default: []
      selector:
        action:
    channel_two_off_long:
      name: Channel two - off button - long press
      description: Action to run on long press on Two off button 
      default: []
      selector:
        action:
    channel_two_off_stop:
      name: Channel two - off button - long press release
      description: Action to run on long press release on Two off button 
      default: []
      selector:
        action:  
        
    channel_three_on_short:
      name: Channel three - on button - short press
      description: Action to run on short press on Three on button 
      default: []
      selector:
        action:
    channel_three_on_long:
      name: Channel three - on button - long press
      description: Action to run on long press on Three on button 
      default: []
      selector:
        action:    
    channel_three_on_stop:
      name: Channel three - on button - long press release
      description: Action to run on long press release on Three on button 
      default: []
      selector:
        action:           
    channel_three_off_short:
      name: Channel three - off button - short press
      description: Action to run on short press on Three off button 
      default: []
      selector:
        action:
    channel_three_off_long:
      name: Channel three - off button - long press
      description: Action to run on long press on Three off button 
      default: []
      selector:
        action:
    channel_three_off_stop:
      name: Channel three - off button - long press release
      description: Action to run on long press release on Three off button 
      default: []
      selector:
        action:  

    channel_four_on_short:
      name: Channel four - on button - short press
      description: Action to run on short press on Four on button 
      default: []
      selector:
        action:
    channel_four_on_long:
      name: Channel four - on button - long press
      description: Action to run on long press on Four on button 
      default: []
      selector:
        action:    
    channel_four_on_stop:
      name: Channel four - on button - long press release
      description: Action to run on long press release on Four on button 
      default: []
      selector:
        action:           
    channel_four_off_short:
      name: Channel four - off button - short press
      description: Action to run on short press on Four off button 
      default: []
      selector:
        action:
    channel_four_off_long:
      name: Channel four - off button - long press
      description: Action to run on long press on Four off button 
      default: []
      selector:
        action:
    channel_four_off_stop:
      name: Channel four - off button - long press release
      description: Action to run on long press release on Four off button 
      default: []
      selector:
        action:          
        
mode: restart
max_exceeded: silent


trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: !input remote

action:
  - variables:
      command: "{{ trigger.event.data.command }}"
      cluster_id: "{{ trigger.event.data.cluster_id }}"
      endpoint_id: "{{ trigger.event.data.endpoint_id }}"
      args: "{{ trigger.event.data.args }}"
  - choose:

      - conditions:
          - "{{ command == 'on' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [] }}"
        sequence: !input channel_one_on_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [0, 50] }}"
        sequence: !input channel_one_on_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [] }}"
        sequence: !input channel_one_on_stop

      - conditions:
          - "{{ command == 'off' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [] }}"
        sequence: !input channel_one_off_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [1, 50] }}"
        sequence: !input channel_one_off_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [] }}"
        sequence: !input channel_one_off_stop
#-------------------------------------------------------      
      - conditions:
          - "{{ command == 'on' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 2 }}"
          - "{{ args == [] }}"
        sequence: !input channel_two_on_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 2 }}"
          - "{{ args == [0, 50] }}"
        sequence: !input channel_two_on_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 2 }}"
          - "{{ args == [] }}"
        sequence: !input channel_two_on_stop

      - conditions:
          - "{{ command == 'off' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 2 }}"
          - "{{ args == [] }}"
        sequence: !input channel_two_off_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 2 }}"
          - "{{ args == [1, 50] }}"
        sequence: !input channel_two_off_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 2 }}"
          - "{{ args == [] }}"
        sequence: !input channel_two_off_stop
#-------------------------------------------------------        
      - conditions:
          - "{{ command == 'on' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 3 }}"
          - "{{ args == [] }}"
        sequence: !input channel_three_on_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 3 }}"
          - "{{ args == [0, 50] }}"
        sequence: !input channel_three_on_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 3 }}"
          - "{{ args == [] }}"
        sequence: !input channel_three_on_stop

      - conditions:
          - "{{ command == 'off' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 3 }}"
          - "{{ args == [] }}"
        sequence: !input channel_three_off_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 3 }}"
          - "{{ args == [1, 50] }}"
        sequence: !input channel_three_off_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 3 }}"
          - "{{ args == [] }}"
        sequence: !input channel_three_off_stop
#-------------------------------------------------------     
      - conditions:
          - "{{ command == 'on' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 4 }}"
          - "{{ args == [] }}"
        sequence: !input channel_four_on_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 4 }}"
          - "{{ args == [0, 50] }}"
        sequence: !input channel_four_on_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 4 }}"
          - "{{ args == [] }}"
        sequence: !input channel_four_on_stop

      - conditions:
          - "{{ command == 'off' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 4 }}"
          - "{{ args == [] }}"
        sequence: !input channel_four_off_short

      - conditions:
          - "{{ command == 'move_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 4 }}"
          - "{{ args == [1, 50] }}"
        sequence: !input channel_four_off_long
        
      - conditions:
          - "{{ command == 'stop' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 4 }}"
          - "{{ args == [] }}"
        sequence: !input channel_four_off_stop
#-------------------------------------------------------        
    

The blueprint cant find my Namron devices, I have two 4 channel switch remotes, connected through ZHA using Conbee II. Any suggestions?

Please check Zigbee signature.

Under your switch, select the three dots, manage zigbee device, signature.

“manufacturer”: “NAMRON AS”,
“model”: “4512729”,
“class”: “zigpy.device.Device”

Your device need to have NAMRON AS as manufacturer

“manufacturer”: “Namron AS”,
“model”: “4512703”,
“class”: “zigpy.device.Device”

This is what it says on mine, I guess it is case sensitive. I changed from NAMRON to Namron in the blueprint, now its working :slight_smile:
Thanks!

Hi,

Do you think this will work with zigbee2mqtt aswell? tired to set mqtt in integration but still can’t find the switces in the drop down menu
 Mancufacure should be the right one aswell

Hi.

This will not work with Z2M

Thank you for this blueprint. I had more or less given up on this remote and today I found this blueprint and it works.

Again, thank you.

1 Like

Thanks,
How can setup “Dim until release” with this namron-switch?

The blueprint have several limitation. With this code I was able to get dimOnHold etc to work without the blueprint.

You need to find your actual id’s from eventlistener in development tools:

alias: Wallswitch NAMRON
description: ""
trigger:
  - platform: event
    event_type: zha_event
    event_data:
      device_id: <%%device_id%%>
      endpoint_id: <%%endpoint_id%%>
      command: "on"
    id: "on"
  - platform: event
    event_type: zha_event
    event_data:
      device_id: <%%device_id%%>
      endpoint_id: <%%endpoint_id%%>
      command: "off"
    id: "off"
  - platform: event
    event_type: zha_event
    event_data:
      device_id: <%%device_id%%>
      endpoint_id: <%%endpoint_id%%>
      command: move_with_on_off
      args:
        - 0
        - 50
    id: onHold
  - platform: event
    event_type: zha_event
    event_data:
      device_id: <%%device_id%%>
      endpoint_id: <%%endpoint_id%%>
      command: stop_with_on_off
    id: onRelease
  - platform: event
    event_type: zha_event
    event_data:
      device_id: <%%device_id%%>
      endpoint_id: <%%endpoint_id%%>
      command: move_with_on_off
      args:
        - 1
        - 50
    id: offHold
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: "on"
        sequence:
          - service: light.turn_on
            data:
              brightness_pct: 100
            target:
              entity_id: <%%entiy_id_light%%>
      - conditions:
          - condition: trigger
            id: "off"
        sequence:
          - service: light.turn_off
            data: {}
            target:
              entity_id:
                - <%%entiy_id_light%%>
      - conditions:
          - condition: trigger
            id: onHold
        sequence:
          - repeat:
              while:
                - condition: trigger
                  id: onHold
              sequence:
                - service: light.turn_on
                  data:
                    brightness_step: 10
                  target:
                    entity_id:
                      - <%%entiy_id_light%%>
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 500
      - conditions:
          - condition: trigger
            id: offHold
        sequence:
          - repeat:
              while:
                - condition: and
                  conditions:
                    - condition: trigger
                      id: offHold
                - condition: numeric_state
                  entity_id: <%%entiy_id_light%%>
                  value_template: >-
                    {% if states.<%%entiy_id_light%%>.state == "on"  %}{{
                    states.<%%entiy_id_light%%>.attributes.brightness
                    }}{% else %}0{% endif %}
                  above: 24
              sequence:
                - service: light.turn_on
                  data:
                    brightness_step_pct: -10
                  target:
                    entity_id:
                      - <%%entiy_id_light%%>
                - delay:
                    hours: 0
                    minutes: 0
                    seconds: 0
                    milliseconds: 500
          - service: light.turn_on
            data:
              brightness_pct: 1
            target:
              entity_id: <%%entiy_id_light%%>
mode: restart

I’m not getting this up and running. I have HA with conbee 2 driver and want to adjust ikea light bulbs with namron 4 channel remote.
When I add namron to zha it only shows 4 times battery percentage, no actual switches. Any ideas?

1 Like

Kind of late on this one but your right in your assumption.
It IS case sensitive, so youré most likely wright - thatŽs what made it work.

Brgds
HĂ„vard

Thank you for this nice blueprint🙂 I’ve used it for 4 switches for several months, with no issues. From this 2023.11, I’m getting halted scripts, latency and this in my logs:

Logger: homeassistant.helpers.template
Source: helpers/template.py:2244
First occurred: November 4, 2023 at 10:23:15 PM (165 occurrences)
Last logged: 6:58:53 PM

Template variable warning: ‘dict object’ has no attribute ‘move_mode’ when rendering ‘{{ trigger.event.data.params.move_mode }}’

I am new to Home Assistant and need some help! My switches is shown as Sunricher, they are branded Luzense. They should be the same as Namron.

How do i change from «NAMRON AS» to «Sunricher» in the blueprint or vice versa in the zigbee signature?

Did you find a solution to this? I have the same problem!