Philips Hue wall module (RDM001 / RDM004) button press blueprint

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

The Philips Hue wall module can be used with the Zigbee integration to trigger automations. It is fairly straight forward to get single short button presses to work. However, long presses of double, triple or quadruple button presses are more tricky.

This blueprint helps to get all of the above working.

Note:

  • You must use the wall module together with the Zigbee integration (ZHA)
  • Both the old (RDM001) and the new (RDM004) module are supported
  • Make sure to configure the correct mode depending on the type of button(s) you use. More information on how this is done can be found here.
  • If you have trouble setting up the mode on a new (RDM004) module, check the information here.

Hope this helps others getting their module to do what they want :slight_smile:

blueprint:
  name: Philips Hue Wall Module
  description: "# Philips Hue Wall Module (RDM001 / RDM004)\nThis blueprint allows 
  you to use a Philips Wall Module (RDM001 and RDM004) to trigger automations.\n
  You need to have the module paired to your Home Assistant Zigbee integration
  (ZHA). Depending on the physical switch used (single/double and rocker/push).
  More information on how to do this can be found [here](https://rudd-o.com/linux-and-free-software/how-to-use-the-philips-hue-wall-switch-module-with-push-button-wall-switches-in-home-assistant). 
  If you have a RDM004 module and the 'PhilipsBasicCluster' option is not shown,
  follow the steps layed out [here](https://community.home-assistant.io/t/how-to-configure-the-philips-hue-wall-module-to-use-push-button-momentary-type-wall-switches-zha/451125/27).\n\n
  This blueprint supports the left and right button, single, double, triple,
  quadruple, long press and long press release events.
  "
  domain: automation
  input:
    remote:
      name: Remote
      description: Signify switch to use
      selector:
        device:
          filter:
            - integration: zha
              manufacturer: Signify Netherlands B.V.
              model: RDM001
            - integration: zha
              manufacturer: Signify Netherlands B.V.
              model: RDM004

    button_left_single_press:
      name: Left button single press
      description: Action to run on a single press of the left button
      default: []
      selector:
        action:

    button_left_double_press:
      name: Left button double press
      description: Action to run on a double press of the left button
      default: []
      selector:
        action:

    button_left_triple_press:
      name: Left button triple press
      description: Action to run on a triple press of the left button
      default: []
      selector:
        action:

    button_left_quadruple_press:
      name: Left button quadruple press
      description: Action to run on a quadruple press of the left button
      default: []
      selector:
        action:

    button_left_long_press:
      name: Left button hold
      description: Action to run on a long press of the left button
      default: []
      selector:
        action:

    button_left_long_release:
      name: Left button release
      description: Action to run when releasing the left button after a long press
      default: []
      selector:
        action:

    button_right_single_press:
      name: Right button single press
      description: Action to run on a single press of the right button
      default: []
      selector:
        action:

    button_right_double_press:
      name: Right button double press
      description: Action to run on a double press of the right button
      default: []
      selector:
        action:

    button_right_triple_press:
      name: Right button triple press
      description: Action to run on a triple press of the right button
      default: []
      selector:
        action:

    button_right_quadruple_press:
      name: Right button quadruple press
      description: Action to run on a quadruple press of the right button
      default: []
      selector:
        action:

    button_right_long_press:
      name: Right button hold
      description: Action to run on a long press of the right button
      default: []
      selector:
        action:

    button_right_long_release:
      name: Right button release
      description: Action to run when releasing the right button after a long press
      default: []
      selector:
        action:

mode: single

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 == 'left_press_release'}}"
        sequence:
          - wait_for_trigger:
              - platform: event
                event_type: zha_event
                event_data:
                  device_id: !input remote
                  command: "{{ command }}"
            timeout:
              hours: 0
              minutes: 0
              seconds: 0
              milliseconds: 500
            enabled: true
          - if:
              - condition: template
                value_template: "{{ not wait.trigger }}"
            then: !input button_left_single_press
            else:
              - sequence:
                  - wait_for_trigger:
                      - platform: event
                        event_type: zha_event
                        event_data:
                          device_id: !input remote
                          command: "{{ command }}"
                    timeout:
                      hours: 0
                      minutes: 0
                      seconds: 0
                      milliseconds: 500
                  - if:
                      - condition: template
                        value_template: "{{ not wait.trigger }}"
                    then: !input button_left_double_press
                    else:
                      - sequence:
                          - wait_for_trigger:
                              - platform: event
                                event_type: zha_event
                                event_data:
                                  device_id: !input remote
                                  command: "{{ command }}"
                            timeout:
                              hours: 0
                              minutes: 0
                              seconds: 0
                              milliseconds: 500
                          - if:
                              - condition: template
                                value_template: "{{ not wait.trigger }}"
                            then: !input button_left_triple_press
                            else: !input button_left_quadruple_press
      - conditions:
          - "{{ command == 'right_press_release'}}"
        sequence:
          - wait_for_trigger:
              - platform: event
                event_type: zha_event
                event_data:
                  device_id: !input remote
                  command: "{{ command }}"
            timeout:
              hours: 0
              minutes: 0
              seconds: 0
              milliseconds: 500
            enabled: true
          - if:
              - condition: template
                value_template: "{{ not wait.trigger }}"
            then: !input button_right_single_press
            else:
              - sequence:
                  - wait_for_trigger:
                      - platform: event
                        event_type: zha_event
                        event_data:
                          device_id: !input remote
                          command: "{{ command }}"
                    timeout:
                      hours: 0
                      minutes: 0
                      seconds: 0
                      milliseconds: 500
                  - if:
                      - condition: template
                        value_template: "{{ not wait.trigger }}"
                    then: !input button_right_double_press
                    else:
                      - sequence:
                          - wait_for_trigger:
                              - platform: event
                                event_type: zha_event
                                event_data:
                                  device_id: !input remote
                                  command: "{{ command }}"
                            timeout:
                              hours: 0
                              minutes: 0
                              seconds: 0
                              milliseconds: 500
                          - if:
                              - condition: template
                                value_template: "{{ not wait.trigger }}"
                            then: !input button_right_triple_press
                            else: !input button_right_quadruple_press
      - conditions:
          - "{{ command == 'left_hold'}}"
        sequence:
          - sequence: !input button_left_long_press
          - wait_for_trigger:
              - platform: event
                event_type: zha_event
                event_data:
                  device_id: !input remote
                  command: "left_hold_release"
          - sequence: !input button_left_long_release
      - conditions:
          - "{{ command == 'right_hold'}}"
        sequence:
          - sequence: !input button_right_long_press
          - wait_for_trigger:
              - platform: event
                event_type: zha_event
                event_data:
                  device_id: !input remote
                  command: "right_hold_release"
          - sequence: !input button_right_long_release

2 Likes

Can this blueprint easily be edited to support dimming of lights like the module does when it is connected to the Hue bridge (unless it already supports it)?

I’m looking to convert from using Hue (but I will keep the bridge for some other uses) but am worried that I’ll lose the dimming functionality for long presses on my push buttons.

Can you maybe tell me how to configure long press for dimming my lights ?

When using this automation with momentary contact style buttons (RDM004 in mode 3) the timing to get the right trigger is quite tricky to get right. More precisely: if you want to trigger on a single press have to be very fast! I assume because both the press and release events have to be within the 500ms timeout window. Is it possible to change this behavior or make it configurable?

Thanks for your work on this. I’m still struggling to get anything beyond single press and long press to work. I particularly need the long release trigger to work, but it does nothing. I’m using an RDM004 module configured for two momentary push buttons, along with regenbui’s quirk shared elsewhere. When I press and hold, the log shows “Remote Button Long Press - Right event was fired” repeatedly until I release and it says “Right Hold Release event was fired.” So it appears to recognise the event, but it just won’t trigger the automation. Are perhaps the event names not matching? Is the quirk throwing it off? Has the device firmware updated with revised naming? I’d really appreciate your advice!

In File Editor you can edit the blueprint to change the timeout time in milliseconds.

I’m trying to implement this in my own setup and as far as I can tell it’s most efficient to harness the native Hue dimming functionality + a stop command on button release. This is based on the script shared here. Unfortunately I can’t make it work because the long release trigger is not working (yet!).

Did this blueprint just stop working in 2024.11? Non of my automation based on the bp triggers any more. Any idea?

I second, that the automations do not work anymore since 2024.11.0.

But I think the button presses of the (mechanical) switches are read differently since the update to 2024.11. Because they presses are recognised, but seen as short press/release as new default while it used to be single/double/triple/quadruple press as default.

I think it’s this PR (which is included in the zha bundled with 2024.11) which included quirks for the wall switches making them not behave like before (in a good way). We will probably need to adjust the blueprint or create another one.

Based on this blueprint and ZHA - Philips Hue v2 Smart Dimmer Switch and Remote - RWL022 I did an attempt of a new version that will work with 2024.11.
The new blueprint is available here: Philips Hue Wall Module · GitHub

Please try it out!