Another ZHA Philips Hue Dimmer blueprint, I know… But hey, at least this one works
I found that the universal blueprint for zha/z2m/deconz uses terrible logic at least for its zha implementation and so was looking for something better. Ran into a great blueprint but it was preconfigured for lights which I didn’t feel was the best solutiopn.
As such, this blueprint is a simplified version of stefanroelofs’s `ZHA - Philis Hue Dimmer Switch V2’, but this one has no default inputs and with full configuration available. This makes the remote easily configurable for purposes other than controlling lights.
If you are intending to just use the remote as a light switch, I recommend using his blueprint, which you can find on this same forum here (that’s a link to his post)
Please note that the Philips Hue Dimmer Switch also supports triple, quadruple, and even quintuple button presses. It’s fairly easy to configure these yourself by editing this blueprint.
Please also note that I am not much good at python and therefore probably cannot help you if this does not work. All credit for figuring out how all this works goes to @stefanroelofs and @vanstinator . I just adapted their work to free up the on & dimming buttons to execute other actions.
Thanks so much for making this! I have one RWL020 and one RWL022. For the latter, I’m using this similar Blueprint and it’s working as expected.
For this Blueprint, I have imported it, made a new Automation, selected my ZHA-added RWL020, configured some actions, and pressed some buttons, but nothing is happening. If I press the button, the “Last Triggered” time updates in the list of Automations and an event fires in the Device view, but my actions don’t happen. If I click the ⋮ Three-Dots Menu on one of the Actions in the Blueprint config and select “ Run”, it runs as expected. Something isn’t connecting between the Automation/Event and the Action. Any tips?
I am also unable to get any configured actions to run while using this blueprint with rwl020. I’m fact I can’t get any blueprint working with my rwl020 even though the triggers update when I press a button.
When the RWL021 is connected to the Hue bridge, repeatedly pressing the On button will cycle through a different scenes. Is that just using the double, triple, etc press functions?
Even when the light is already on the Hue bridge seems to count the number of times the button is pressed and acts accordingly.
Everything except turn on works, got a log entry that i cant fix myself… maybe anybody got an idea?:
When the light is on and mode is set to “fixed brightness when on” it also works to get the light to the fixed brightness.
But it does not turn back on when it is turned off.
Stopped because an error was encountered at 29. Dezember 2023 um 09:22:35 (runtime: 0.00 seconds)
ValueError: Template error: int got invalid input ‘None’ when rendering template ‘{{ state_attr(light, ‘brightness’) | int }}’ but no default was specified
@patzl @coalfield @xd1936 @Oseriduun
Sorry I failed to reply to you all, I’m meant to be getting notifications about this thread but I haven’t been. Did you manage to figure out your issues? I’m still using the template myself with no problems. I did change two lines in mid december but the core functionality isn’t affected. AFAIK the blueprint works as intended. Did other blueprints work for you?
@RemcoMe only 6 months late so I’m sure you’re figured it out by now, but no, it’s not the same. I’m not entirely sure how to reproduce that functionality other than making an if-then event on on-button press that basically cycles through (if off, then scene 1. If scene 1, then scene 2. etc). Double, triple press etc refers to quick presses in succession, which are registered as different event types. So you could, instead of cycling, instantly go to scene two from your example by setting that scene to double press.
Has anyone else found this stopped working recently?
Within the last week.
I’m not sure if there was a ZHA update or firmware update preceded it, but the button press events have changed: “on”, “step”, “step” and “off with effect”.
Device info:
RWL021
by Philips
Firmware: 0x420045b6
edit: nevermind. I re-paired the remote and it’s back to working with this blueprint again. Strange behaviour, I have no idea what caused it.
I have the RWL020 paired and confirmed Home Assistant can detect button presses - however the remote doesn’t appear in the Device Selection menu. Running the latest version of Home Assistant. Anything I can check to get it to show in the blueprint?
Did this blueprint recently start acting up for anyone else too? I’m having a really weird issue with a light group. The group has 2 Hue lights connected via ZHA, and one LED strip via WLED.
The automation only switches the two Hue lamps, but not the LED strip. When I switch the group on/off with an action call or just the UI, the group works fine.
I also made a simple automation with the device trigger, just to turn the group on and off, and that works fine.
Oh and changing brightness with this blueprint does work fine on the entire group.
Yep - I am having new issues as well. Tried re-pairing the remote in ZHA and still did not fix the issue. It’s very odd - the blueprint automations are not working to turn lights on and off - it had been working well previously. I don’t remember how the zha_event data reported from the switch before things stopped working, but I don’t see a clear reason that it should have changed as the command type (for example, off_press) still appears to be the same despite the addition of some ‘arg’ data). When I look at the traces for the automation for the blueprint, it looks as though it is working correctly, but for whatever reason, the action calls are not resulting in the light off/on actions that I have built in. So I’m still not sure what is causing this weird behavior.
I did seem to get things working by changing the blueprint such that it runs in paralel mode:
mode: parallel
max_exceeded: silent
I am theorizing that each physical button press is triggering 2-3 different zha events (on press, release, etc) that might be interfering with each other in a “restart” mode.
I changed it to parallel from restart, and that seems to have fixed it!
I had noticed via the traces that every button press causes the automation to run twice.
For example: off press has one command: off_press and one command: off_short_release, in that order. The off_short_release doesn’t trigger any actions in the automation, but when the automation is in mode: restart, it restarts the automation.
I am also having issues. I have tried the solution provided by @rclodfelter and @Sjorsa but that did not lead me to having my issues resolved, on it’s own.
My solution came from combining the change in the running mode of the automation but also changing the value of the value template on the short-on-press to “on_short_release”. I I should be seeing the value “on_press” but that is not the case and at least for now, this workaround works.
I’m not sure if this workaround will be needed by others as in my last round of updates, several things went mad (which might be causing this issue and others). However, give it a try if nothing else works!