ZHA - Philips Hue v2 Smart Dimmer Switch and Remote - RWL022

I will test it and see if I can get it to work depending on the step size.

Hi,

This is a very handy blueprint and I’m already using it for a couple of weeks. Thank you for sharing!

With that being said, I’m having some issues with the events generated by the remote.

For a double press, the remote sends events for each short press and only after that an event of double press.
Similarly for long press, the first event is “Short press” and only after a “Long press” is detected.
Each event is resolved by the blueprint, which makes a mess or a lot of blinking lights at the least.
Is there any known workaround for this?

I don’t know if it’s related but sometimes the first press is not detected. I guess the event doesn’t fire.

Can you show me where to add the action? I get problems when adding it to my blueprint and unsure exactly where the action should be?

alias: Hue Dimmer Landing
description: ""
use_blueprint:
  path: dustins/zha-philips-hue-v2-smart-dimmer-switch-and-remote-rwl022.yaml
  input:
    zha_device: ea377ac62ac7219259bd385e18f0e901
    Power_Press:
      - service: light.toggle
        data: {}
        target:
          entity_id:
            - light.landing_ceiling_lights
    Power_Press2x:
      - service: light.toggle
        data: {}
        target:
          entity_id: light.landing_floor_lamp
    Hue_Press:
      - type: toggle
        device_id: 6167afd5194acfd4f9c80953495b0519
        entity_id: switch.philips_tv_outlet_local
        domain: switch
    Up_HoldPress:
      - service: light.turn_on
        data:
          brightness_step_pct: 10
        target:
          entity_id: light.landing_ceiling_lights
    Down_HoldPress:
      - service: light.turn_on
        data:
          brightness_step_pct: -10
        target:
          entity_id: light.landing_ceiling_lights

The action: is not needed, I had it in the code because I wrote it fresh in automation GUI. :wink:

I edited the code from my previous post.
You place the - if: right after Down_HoldPress:. Make sure the indentation is correct after pasting.

Is there a way of adding smooth dimming when long hold-pressing the up and down buttons?

I can’t find a way of adding it to this as I’m not sure what the action should be.

Yes, there is. You have to incorporate Controllerx.
https://xaviml.github.io/controllerx/

2 Likes

I have a strange issue.
When I click once, it is working correctly, when I hold, both state (single and long) triggers.
I am using ZHA integration.

zha_event shows 3 events on single click. For example up button.

up_press
step
up_short_release

It also shows 6 events on long click.

stop
up_press
step (twice)
up_short_release
up_hold
up_long_release

Hi, would it be possible to make this work with HA implementations where logbook is disabled. It doesn’t work in those cases. The workaround is to enable logbook. Thanks

Yes, the button logic is not well thought out, and long pressing etc activates short presses as well. I would love to see the github repo of this plugin and be able to give detailed bug reports or PRs.
@dustins any plans on publishing this somewhere so the community can contribute?

Hi, thank you for the blueprint it works fine for me!
There is just one thing I would wish but didn`t find parameters to change:
For multiple press of the Hue-Button this has to be done very rapidly so is there a chance to extend the periods between the clicks?
What I meean is when using the dimmer switch in original Hue configuration, the possible period between two klicks is about one or two seconds - but with this blueprint the button has to be pressed one after other within half a second (or maybe less…).

Jörg

Hi :slight_smile: sprout here with one question:
I want to use the RWL021 modified version of the Blueprint, but how do I import it? I can just import through an URL, and a local .yaml file I created is also not taken as address.
Thanks for the help!
And also if anyone of you has time, maybe you can tell me how to exactly model the original switch’s behavior?

Ok, so right now I have a “test room” where the Zigbee (Philips Hue RWL021) Remote is connected to ZHA, but the Lights are still part of the Hue Bridge System.
So far I found a blueprint that allows me to switch the Lights on at a specific scene, and another scene if I do a long press.
But I could not find one that lets me replicate the original behavior:

  • “On” activates a scene, but when I press “on” again, it switches to the next scene in a specific order
  • Dim down to 10% when I keep pressing -, Dim to 100% when I keep pressing +.

Did anyone achieve that?
I would also be fine with the RWL22 behavior on my RWL21 remote:

  • “The top button” gives you the scene for that particular day time, and another press switches it off
  • “The bottom button” cycles through the available scenes
    Did anyone achieve that?

Thank you for your replys! :slight_smile:
-taurui

1 Like

The automation isn’t showing up in the list of ZHA integrations for the device, probably because the event selection is done by hand with a condition: statement. This is just a minor issue… it otherwise worked fine. I looked at the other suggested automation and there’s enough combinations already without having to add delays with timeouts/dejittering so I tend to prefer this one solution. Maybe I’d be possible to add a light hook to this one by converting the automation into a second blueprint?

I also had to drop the logbook or it wouldn’t work, I don’t have that module enabled.

--- zha-philips-hue-v2-smart-dimmer-switch-and-remote-rwl022.yaml.orig
+++ zha-philips-hue-v2-smart-dimmer-switch-and-remote-rwl022.yaml
@@ -208,33 +208,14 @@
   source_url: https://community.home-assistant.io/t/zha-philips-hue-v2-smart-dimmer-switch-and-remote-rwl022/353143
 mode: single
 max_exceeded: silent
-variables:
-  device_id: !input zha_device
 trigger:
 - platform: event
   event_type: zha_event
-condition: '{{ trigger.event.data.device_id == device_id }}'
+  event_data:
+    device_id: !input zha_device
 action:
 - variables:
-    button: '{{ trigger.event.data.args.button }}'
-    press_type: '{{ trigger.event.data.args.press_type }}'
     command_type: '{{ trigger.event.data.command }}'
-- service: logbook.log
-  data:
-    name: Button
-    message: '{{ button }}'
-- service: logbook.log
-  data:
-    name: Press Type
-    message: '{{ press_type }}'
-- service: logbook.log
-  data:
-    name: Device
-    message: '{{ zha_device }}'
-- service: logbook.log
-  data:
-    name: Command
-    message: '{{ command_type }}'
 - choose:
   - conditions: '{{ command_type == "on_press" }}'
     sequence: !input Power_Press

Does anyone know how to setup the automation using this blueprint so the switch is configured in the same way as if it works via the Hue hub? I’m new to HA and when I check all the options under “Automation” I don’t know where to start and I need my lights working.

Is it possible to have to make this blueprint show RWL022 and RWL020? I tried a few modifications, but couldn’t find the right syntax to have it show both models in the drop down list.

I am sorry if this has been addressed or if there is somewhere I can read up on this. I am new to using blueprints. Thank you for the work on this.

I have been able to map the buttons to various things inside HA. I am trying to get the button presses to work in NodeRed now. I don’t see any of the buttons or options showing up in the list. My thoughts were that I could make some kind of trigger that would show up in NodeRed and map the button presses to that trigger.

Let me know if this is not how this is supposed to work or if I am looking at this incorrectly.
Thank you,

Great blueprint. Thanks @dustins

Hi All, I’m sure this is an easy question:

I love the ability to easily configure my RWL022 dimmers with this blueprint. The only thing I don’t understand is:

How to configure the dimming options? I only have service : lights on or lights off. I guess I would need Up hold and Down Hold - but what trigger action to make?

The on/off buttons work fine and I can set the brightness, but I’m struggling with the brightness buttons (how to get it to dim or become brighter when holding the dim buttons)

I haven’t used this blueprint in quite a while at this point but you should be able to map one of the buttons to the light.turn_on service with the brightness_step_pct set to have dimming work right? Unless you mean holding down a button? I don’t have an easy solution for that and would end up resorting to something like Node-RED. But others might be able to come up with a good solution.

I didn’t have plans for that but would would be happy to. Is there a way to link an existing blueprint like this to GitHub?

Hi @dustins Would you be willing to integrate this brightness feature in the blueprint?

Idealy we replicate how it worked with Philips hue bridge. You could press and hold and the + button and it would brighten the lights in the room and minus the other way around. Pressing it once would only dim it with one increment etc.

Is this possible? I found this one:

Not sure if this is OK.