Homematic - Actions for HmIP-WRC6 / HM-PB-6-WM55

When a button is pressed, the defined actions will be executed. Please keep in mind, that long-press actions might be executed multiple times, according to your configured minimum duration for long press. This can be configured in your CCU.

Please use your HmIP-WRC6 / HM-PB-6-WM55 Devicename as shown in your CCU.

Requirements:

  • HmIP-WRC6 or HM-PB-6-WM55 Device
  • Homematic Integration for your CCU. Homematic IP Cloud is not supported!

Blueprint:

blueprint:
  name: Actions for HmIP-WRC6
  description: When a button is pressed, the defined actions will be executed. Please keep in mind, that long-press actions might be executed multiple times, according to your configured minimum duration for long press. This can be configured in your CCU.
  domain: automation
  input:
    switch:
        name: HmIP-WRC6 Device
        description: Please select a HmIP-WRC6 entity of your Homematic (not Homematic Cloud) integration by typing in the name of the device which was set in your CCU.
        
    action_left_top_short:
        name: Action
        description: Left-Top-Button, Short Press
        default: []
        selector:
            action: {}
    action_left_top_long:
        name: Action
        description: Left-Top-Button, Long Press
        default: []
        selector:
            action: {}
    action_right_top_short:
        name: Action
        description: Right-Top-Button, Short Press
        default: []
        selector:
            action: {}
    action_right_top_long:
        name: Action
        description: Right-Top-Button, Long Press
        default: []
        selector:
            action: {}
    action_left_middle_short:
        name: Action
        description: Left-Middle-Button, Short Press
        default: []
        selector:
            action: {}
    action_left_middle_long:
        name: Action
        description: Left-Middle-Button, Long Press
        default: []
        selector:
            action: {}
    action_right_middle_short:
        name: Action
        description: Right-Middle-Button, Short Press
        default: []
        selector:
            action: {}
    action_right_middle_long:
        name: Action
        description: Right-Middle-Button, Long Press
        default: []
        selector:
            action: {}
    action_left_bottom_short:
        name: Action
        description: Left-Bottom-Button, Short Press
        default: []
        selector:
            action: {}
    action_left_bottom_long:
        name: Action
        description: Left-Bottom-Button, Long Press
        default: []
        selector:
            action: {}
    action_right_bottom_short:
        name: Action
        description: Right-Bottom-Button, Short Press
        default: []
        selector:
            action: {}
    action_right_bottom_long:
        name: Action
        description: Right-Bottom-Button, Long Press
        default: []
        selector:
            action: {}

trigger:
  - platform: event
    event_type: homematic.keypress
    event_data:
      name: !input 'switch'
      
condition: []
    
action:
  - choose:
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 1 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_left_top_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 1 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_left_top_long'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 2 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_right_top_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 2 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_right_top_long'        
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 3 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_left_middle_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 3 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_left_middle_long'
        
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 4 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_right_middle_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 4 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_right_middle_long'        
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 5 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_left_bottom_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 5 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_left_bottom_long'
        
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 6 and trigger.event.data.param == 'PRESS_SHORT' }}
        sequence: !input 'action_right_bottom_short'
      - conditions:
          - condition: template
            value_template: >-
              {{ trigger.event.data.channel == 6 and trigger.event.data.param == 'PRESS_LONG' }}
        sequence: !input 'action_right_bottom_long'    

mode: parallel
max: 10
1 Like

Fantastic job
One remark from my side: I think naming it switch is not correct in english. RemoteControl or PushButton is better.

1 Like

If you’re interested, you can use Variables and the shorthand notation for Template Conditions to reduce the size of the action section.

action:
  - variables:
      channel: '{{ trigger.event.data.channel }}'
      param: '{{ trigger.event.data.param }}'
  - choose:
      - conditions: "{{ channel == 1 and param == 'PRESS_SHORT' }}"
        sequence: !input 'action_left_top_short'
      - conditions: "{{ channel == 1 and param == 'PRESS_LONG' }}"
        sequence: !input 'action_left_top_long'
      - conditions: "{{ channel == 2 and param == 'PRESS_SHORT' }}"
        sequence: !input 'action_right_top_short'
      - conditions: "{{ channel == 2 and param == 'PRESS_LONG' }}"
        sequence: !input 'action_right_top_long'        
      - conditions: "{{ channel == 3 and param == 'PRESS_SHORT' }}"
        sequence: !input 'action_left_middle_short'
      - conditions: "{{ channel == 3 and param == 'PRESS_LONG' }}"
        sequence: !input 'action_left_middle_long'
      - conditions: "{{ channel == 4 and param == 'PRESS_SHORT' }}"
        sequence: !input 'action_right_middle_short'
      - conditions: "{{ channel == 4 and param == 'PRESS_LONG' }}"
        sequence: !input 'action_right_middle_long'        
      - conditions: "{{ channel == 5 and param == 'PRESS_SHORT' }}"
        sequence: !input 'action_left_bottom_short'
      - conditions: "{{ channel == 5 and param == 'PRESS_LONG' }}"
        sequence: !input 'action_left_bottom_long'
      - conditions: "{{ channel == 6 and param == 'PRESS_SHORT' }}"
        sequence: !input 'action_right_bottom_short'
      - conditions: "{{ channel == 6 and param == 'PRESS_LONG' }}"
        sequence: !input 'action_right_bottom_long'    

If you wish, you can even create variables for short and long as well.

action:
  - variables:
      channel: '{{ trigger.event.data.channel }}'
      param: '{{ trigger.event.data.param }}'
      short: 'PRESS_SHORT'
      long: 'PRESS_LONG'
  - choose:
      - conditions: "{{ channel == 1 and param == short }}"
        sequence: !input 'action_left_top_short'
      - conditions: "{{ channel == 1 and param == long }}"
        sequence: !input 'action_left_top_long'
 ... etc ...

Nice! I modified yours to work with a HmIP-KRC4.
A link to the gist

I just wanted to build a similar thing for HM-PB-6-WM55, and realized that your blueprint is compatible to this one as well. You might want to add that to the title :slight_smile:

Thanks for your work!

1 Like

Great to hear! I’ll add this to the description.

Is this still working for you… it detects the push from the wrc6 button, but it does not trigger an event in nodered. If I trigger the automation manually, nodered gets triggered. Link homeassistant and nodered seems to be working, likewise ccu homeassistant gets triggered, but somehow things get lost in translation. Did something change in homeassistant that requires the template to be revised?

Resolved by using a different blueprint: custom_homematic/homematicip_local-actions-for-6-button.yaml at 789b37f30e07eefe9edefae6d774590e17f21bf4 · danielperna84/custom_homematic · GitHub

1 Like

Hi there,

yesterday i tried to implement the HmIP-WRC6 into HA. So i followed the intruction on https://github.com/danielperna84/custom_homematic#events-for-homematicip-devices
So program on CCU/Raspberrymatic created an disabled. In HA ich see the device but it has only two channels. These channels works fine and i can trigger automations with these channels. The other 4 channels are missing. so if i hit the button, nothing happens.Bildschirmfoto 2023-10-02 um 16.38.48
Any ideas?
CYA

worked for me as well

Does anyone know how I can control the LED from the button? Haven’t found anything about this ?

Great work, thanks a lot!
Any idea how to realize an action to be taken only in case of simultaneous pressing of two buttons?
For example:
top-left + top-right simultaneously = script is getting executed

Intention is to avoid any kind of “push by accident” since I’d like to use it to activate our alarming-system; would be terribly loud to activate if a window / door is open that moment… :wink:

In such constellation I may use with not making use of the single buttons any longer…

No, this is not possible as the hardware does not support that.

1 Like

Too bad but thanks a lot for your reply!

Thanks for this great blueprint. I have one question regarding dimming with long button presses:

I am using both HMIP Cloud and HMIP Raspberrymatic addon with Home Assistant. To be more flexible, I have installed all my wall switches (Taster) on the Raspberrymatic and can now configure their use very flexible with this blueprint!

With one WRC6 I would like to use a button pair to operate a dimming plug (HmIP-PDT). While the short button presses can turn on/off the plug, how do I implement a dimming process, e.g. incrementally dimm the light while holding it pressed? Any ideas?