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)
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]