ZHA - Lutron Connected Bulb Remote

This is a general use for the Lutron Connected Bulb Remote
This works for ZHA only!

You can define any actions for the four buttons: Button 1 (on), Button 2 (dim up), Button 3 (dim down), and Button 4 (off).

I’m not sure why but filtering device by manufacturer “Lutron” doesn’t work even though that’s what the ZHA device manager says the manufacturer is. I commented that out and only filter based on model in this case.

Thanks go to wormie_dk for the IKEA five button remote that I based this from.

Get started

Click the badge to import this Blueprint: (needs Home Assistant Core 2021.3 or higher)

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

Or import this Blueprint by using the forum topic URL:

blueprint:
  name: ZHA - Lutron Connected Bulb Remote
  description: Control anything using Lutron Connected Bulb Remote

  domain: automation
  input:
    remote:
      name: Remote
      description: Lutron Connected Bulb Remote to use
      selector:
        device:
          integration: zha
#         manufacturer: Lutron
          model: LZL4BWHL01 Remote
    button_1:
      name: Button 1 press
      description: Action to run on press of button 1 (On)
      default: []
      selector:
        action:
    button_2:
      name: Button 2 press
      description: Action to run on press of button 2 (Dim Up)
      default: []
      selector:
        action:
    button_3:
      name: Button 3 press
      description: Action to run on press of button 3 (Dim Down)
      default: []
      selector:
        action:
    button_4:
      name: Button 4 press
      description: Action to run on press of button 4 (Off)
      default: []
      selector:
        action:

mode: restart
max_exceeded: silent

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 == 'move_to_level_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [254, 4] }}"
        sequence: !input button_1

      - conditions:
          - "{{ command == 'step_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
        sequence: !input button_2

      - conditions:
          - "{{ command == 'step' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
        sequence: !input button_3

      - conditions:
          - "{{ command == 'move_to_level_with_on_off' }}"
          - "{{ cluster_id == 8 }}"
          - "{{ endpoint_id == 1 }}"
          - "{{ args == [0, 4] }}"
        sequence: !input button_4

[Edit: Removed args in buttons 2 and 3 to accommodate newer Home Assistant versions]

6 Likes

This is incredible! I’ve been trying to solve this problem with my remotes since Wink crapped out. I’ve been trying to figure out what the use of Blueprints is for a month. You have answered both! Thank you and will you be my valentine?

This is great! Is it possible to add button released actions? Also is it possible to do something like detect long press or double press?

This remote does not generate separate “long press” events, likely because this remote has dedicated dim buttons, while most other remotes don’t have dedicated dim buttons and require hold to dim to use a dimming action.

There’s also no double-press or triple press events generated by the switch. You could possibly keep track of button presses and use a timer to do this, there are blueprints posted by people for other remotes that can possibly be adapted for this.

Regarding released actions:

The on and off buttons only have a press action, so there is no way to use released actions on these two buttons.

The dim buttons do generate commands as long as they are being held (“step_with_on_off” for up, “step” for down) and a “stop” command when released, so theoretically you could have an action on the step action and a release on the stop action, but

  • It would only these two buttons, as this is not possible on the on and off buttons
  • The stop command is the same when releasing either of the above buttons so you would need to keep track of which step state it was last in to determine which button was released when the stop command was seen.
  • The stop command doesn’t seem to be reliably sent on release, sometimes it isn’t.

As such, it’s probably not worth the effort on trying to get release actions working for just those two buttons

1 Like

Hello, I have one of those remotes. When I paired the remote, I did a factory reset and after that did an add device in zha. ZHA sees it as a device. I tried to used this blueprint, but it doesn’t trigger. I looked at the zha_event and it doesn’t seem to see the button pushes. The device is associated with the correct quirk as far as I can tell. I am not sure what I am missing. Running on a two week old install of hassio.

I find that sometimes adding the remote doesn’t fully configure it, with the added device not showing the correct device information.

Also make sure you don’t bind any clusters if you are going to use the remote with ZHA_events (I.E. automations or blueprints). If you bind any clusters then it will not broadcast its events to Home Assistant.

Try doing another factory reset and re-add it again.

This is a working remote.

image

This is what I am seeing. RSSI is unkown, but all my Zigbee devices are like that.
LQI unknown, my other devices have a value there.
Device info
LZL4BWHL01 Remote
by Lutron
Zigbee info
IEEE: ff:ff:00:0f:e7:ff:4c:ad
Nwk: 0x1715
Device Type: EndDevice
LQI: Unknown
RSSI: Unknown
Last Seen: 2021-07-11T19:47:44
Power Source: Battery or Unknown
Quirk: zhaquirks.lutron.lzl4bwhl01remote.LutronLZL4BWHL01Remote

So I deleted the device, factory reset it, rebboted home assistant, then paired the remote again.

this time I see

Zigbee info
IEEE: ff:ff:00:0f:e7:ff:4c:ad
Nwk: 0x382e
Device Type: EndDevice
LQI: 155
RSSI: Unknown
Last Seen: 2021-07-12T20:33:16
Power Source: Battery or Unknown
Quirk: zhaquirks.lutron.lzl4bwhl01remote.LutronLZL4BWHL01Remote

I am still not seeing zha_event when I press the buttons. Any ideas?

I tried to reconfigure the device and I get a failure.

Does it show the device as “LZL4BWHL01 Remote”? It it doesn’t, that is when it is in the “bad” state. You will need to factory reset it again.

It might be that the OnOffGroupCluster being bound might be causing the issues . Maybe remove it, factory reset it, re-add it, and see what happens.

Hold the top and bottom buttons down, keep holding it, the light will turn on, it will start blinking, then wait till it goes off. Then you can release. If you release before then it might not be totally cleared.

When adding it, you might want to bring it close to the Zigbee stick at least to start, to make sure it is provisioned correctly.

If you need to reconfigure it and/or bind clusters to a light you may have to periodically tap a button to keep it awake (but you DON’T want to bind clusters to a light it at all if you are using the blueprint, that will prevent zha_events from working)

This is what I get on the first re-configure. Subsequent re-configures don’t produce any prompts or pop ups.

Thanks for the Blueprint!
The reason the manufacturer filter doesn’t work is some bulbs report manufacturer as “Lutron” and some as " Lutron" (with a preceding space).
I’ve found the remote cannot be rebound, has to be reset and then readded (haven’t looked at why the rebinding fails). Additionally, it works best if you add the remote while close to the hub as spotty connections can make it not bind properly to the hub’s group.

After deleting, reseting the remote multiple times, I tried with an Ikea button, same thing, no zha_event. I finally tried with a new zigbee coordinator and now everything gets added and sends zha_events. Thanks for your help.

after the latest update to 2022.4 and subsequent 2022.4.1, I am unable to get this blueprint to trigger scenes. I have tried “activate scene” and “call service scene.activate” and neither work. I can trigger individual lights and other single devices but scenes are no longer working.

Something changed in the 2022.4 release. I deleted these 2 lines from the conditions list for button 2 and button 3 in the blueprint, restarted Home Assistant, and everything works again.

I successfully replaced the lines deleted above with:

    - '{{ args == ''[<StepMode.Up: 0>, 30, 6]''}}'
          for !input 'button_2'
    - '{{ args == ''[<StepMode.Down: 1>, 30, 6]''}}'
          for !input 'button_3'

as I found this was the new zha_event results when the 2/3 buttons are pressed after updating to 2022.4. These additions didn’t seem to add anything to the operation, so for me I just deleted them. Perhaps they were for some future enhancement to the blueprint?

The blueprint is by default in this folder:
/blueprints/automation/Xelloss99

Hope that Xelloss99 will review this and update the blueprint.

I am still getting the events that should trigger button 2 and 3 and I do not see any

here is a button 2 event (it doesn’t trigger the automation)

{
    "event_type": "zha_event",
    "data": {
        "device_ieee": "ff:ff:00:0f:e7:ff:4c:ad",
        "unique_id": "ff:ff:00:0f:e7:ff:4c:ad:1:0x0008",
        "device_id": "68e993a1d233001ccee30afbd3551500",
        "endpoint_id": 1,
        "cluster_id": 8,
        "command": "step_with_on_off",
        "args": [
            0,
            30,
            6
        ],
        "params": {
            "step_mode": 0,
            "step_size": 30,
            "transition_time": 6
        }
    },

running 2022.4.5

Press your button 2 then select Edit Automation in the UI. Select Show Trace and find the trace for the last button press (there will also be a button 2 release trace, but nothing happens there). Select to Changed Variables. In the first step you will see the variables from the zha_event as you see them in Developer Tools. Now go down a couple steps and you’ll see the actual returned variables:

command: step_with_on_off
cluster_id: 8
endpoint_id: 1
args: ‘[<StepMode.Up: 0>, 30, 6]’

You can see the args are formatted differently than the zha_event result, which was the change from before 2022.4.x

Edit the blueprint to remove the condition using the args result entirely, it’s not needed for the automation logic. Or replace the arg result test to match what you see in the Debug/Trace results.

Well that fixed it for me. thanks.

Thanks, I updated this blueprint. I was holding off upgrading Home Assistant until I got my Zwave (deprecated) updated to Z-Wave-JS so didn’t notice the breaking change. Since buttons 2 and 3 didn’t need the args to uniquely identify the button press (1 and 4 do though) this works fine with any HA version.

Core Update 2022.7.2 just broke the blueprint again. This time no buttons are working. The blueprint doesn’t seem to respond at all to any button press ie no Trace was generated to look at. I returned to Core 2022.6.7 and all buttons are working again. Any idea to why the blueprint doesn’t even see the button press?

I have had issues with mine in the past and wanted to start over. I removed the button blueprint for all devices and then deleted the blueprint and re-added to HA. I can no longer see any bulb remote as an option with the blueprint. As of 2022.7.3, none of the buttons were responding so that is why I removed them to start over. I can see actions in the device info from each button and each remote but it still does not find the remotes to connect to the blueprint.
image

Similar but not identical issue. My blueprint only seems to detect the top and bottom buttons, not the the two middle buttons.
Not sure why it’s not detecting the middle buttons. I have updated to the latest blueprint, but no luck.