ZHA - Philips Hue Dimmer Switch (RWL020, RWL021)

Fix my issue thanks!

The blueprint, as it installs using automated install, is broken, It will definitely turn on the light, but dim and off no longer working.
I use the blueprint so I don’t have to mess with code too much. If there is a fix, it should really be put in the blueprint so others downloading do not have to mess with the code to fix a bug…

There are alternative blueprints for the RWL020 / RWL021 (Version 1) Dimmer Switches, and there is a nice V2 dimmer switch blueprint if you have the new one with the Hue button on the bottom.
This one works well for the Version 1 (RWL020/RWL021) dimmers, a lot of options in it though and maybe not quite as simple, but the main thing is it works.

This blueprint does not seem to be working anymore with my RWL020. The on button will work to turn the light on, but the dim and off buttons do not do anything.

Can we get a fix please? This is my favorite blueprint for this device and would love to keep using it.

1 Like

Can confirm. Currently, both the v1 and v2 versions seem to be broken. v2 doesn’t even seem to pick up any actions. v1 does register my off/on presses, but doesn’t do anything to the lights.

hey guys, i fixed it.
i dont understand why, but the declaration of the variable ‘args’ doesnt work anymore.

quick’n’dirty fix:
replace all ‘{{ args == […] }}’
with ‘{{ trigger.event.data.args == […] }}’

that sould fix it.


I’m in the same boat as @jeremytodd1
For as long as I can remember, only the ON button has been working.

Thank you so much for this. First blueprint I have tried that works like expected with RWL021

Hey, that was the solution in my case too!
But I also didn’t understand why the variable is no longer pulled correctly.

Thank you!

doest seem to work for me,

I can only get the on button to work.

randomly thought i would try and change the on button to turn off the light and that doesn’t work either. Although i am very new here it could just be my coding lol

1 Like

Same for me. Something changed and now I can only use the turn on button, everything else is without function.

by me the same :frowning:

that worked like a charm, thx!

I have exactly the same behavior. Only the ON button works.
Does anybody know what’s ther problem with it?


I have the same behavior. any fix would be great.

sorry where can I change this. Still a noob to HA…

I am on ZHA Skyconnect only and use a RWL021 probably v1. It is quite old

I spent some time learning how Blueprints work yesterday and came up with this modification of the original. Note this has only been tested with the v1 remote as that’s all I have but it restores functionality to all buttons for me.

  name: ZHA - Philips Hue Dimmer Switch (Fixed)
  description: 'Control lights with a Philips Hue Dimmer Switch.

    The top "on" button will turn the lights on to the last set brightness

    (unless the force brightness is toggled on in the blueprint).

    Dim up/down buttons will change the brightness smoothly and can be pressed

    and hold until the brightness is satisfactory.

    The bottom "off" button will turn the lights off.

  domain: automation
      name: Philips Hue Dimmer Switch
      description: Pick either RWL020 (US) or RWL021 (EU)
            - integration: zha
              manufacturer: Philips
            - domain:
                - sensor
                - battery
          multiple: false
      name: Light(s)
      description: The light(s) to control
            - domain:
                - light
      name: Force turn on brightness
        'Force the brightness to the set level below, when the "on" button
        on the remote is pushed and lights turn on.'
      default: false
        boolean: {}
      name: Brightness
      description: Brightness of the light(s) when turning on
      default: 100
          min: 0.0
          max: 100.0
          mode: slider
          step: 1.0
          unit_of_measurement: "%"
  source_url: https://community.home-assistant.io/t/zha-philips-hue-dimmer-switch-rwl020-rwl021/255048
mode: restart
max_exceeded: silent
  force_brightness: !input force_brightness
  - platform: event
    event_type: zha_event
      device_id: !input remote
  - variables:
      command: "{{ trigger.event.data.command }}"
      cluster_id: "{{ trigger.event.data.cluster_id }}"
      endpoint_id: "{{ trigger.event.data.endpoint_id }}"
  - choose:
      # Light on
      - conditions:
          - "{{ command == 'on' }}"
          - "{{ cluster_id == 6 }}"
          - "{{ endpoint_id == 1 }}"
          - choose:
              - conditions: "{{ force_brightness }}"
                  - service: light.turn_on
                    target: !input light
                      transition: 1
                      brightness_pct: !input brightness
              - service: light.turn_on
                target: !input light
                  transition: 1
      # Light off
      - conditions:
          - "{{ command == 'off_press' }}"
          - "{{ cluster_id == 64512 }}"
          - "{{ endpoint_id == 2 }}"
          - service: light.turn_off
            target: !input light
              transition: 1
      # Brightness up
      - conditions:
          - "{{ command == 'step' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ trigger.event.data.params.step_mode == 0 }}"
          - service: light.turn_on
            target: !input light
              brightness_step_pct: 10
              transition: 1
      # Brightness down
      - conditions:
          - "{{ command == 'step' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ trigger.event.data.params.step_mode == 1 }}"
          - service: light.turn_on
            target: !input light
              brightness_step_pct: -10
              transition: 1

I did try setting trigger.event.data.params.step_mode as a step_mode variable in the actions but I couldn’t get it to work :man_shrugging:.

1 Like

Nice this worked for me. Thanks!

I can only use the off button, the other buttons aren’t working for me. I have the
by Philips
Firmware: 0x42006f9d

fantastic thank you for mentioning this!

This blueprint solved the problem with the blueprint in the thread start where only the “on” button works.

I had trouble figuring out how to get @Twiglet’s blueprint into my Home Assistant. The only way I managed to figure out to get it to work was to import the original blueprint and then replace the contents of blueprints\automation\vanstinator\zha-philips-hue-dimmer-switch-rwl020-rwl021 with @Twiglet’s code. There is probably some better way to do it.
Thanks anyway @Twiglet!