Skip to content

Instantly share code, notes, and snippets.

@MattJeanes
Last active October 31, 2024 07:53
Show Gist options
  • Save MattJeanes/3a111204d44ceb106b1e5fc9eda69805 to your computer and use it in GitHub Desktop.
Save MattJeanes/3a111204d44ceb106b1e5fc9eda69805 to your computer and use it in GitHub Desktop.
Home Assistant automation for ZHA joined 2nd gen Hue dimmer switches which are bound directly to the lights but still want to use the Hue single/double/triple/etc button presses
blueprint:
name: ZHA Hue Dimmer Switch 2nd Gen
description: Allow Hue button functionality for a directly bound 2nd gen Hue Dimmer Switch
domain: automation
input:
device_id:
name: Device
description: Hue Dimmer Switch
selector:
device:
filter:
integration: zha
manufacturer: Signify Netherlands B.V.
model: RWL022
single_press_action:
name: Single Press Action
description: Action to run when the button is single pressed
default: []
selector:
action: {}
double_press_action:
name: Double Press Action
description: Action to run when the button is double pressed
default: []
selector:
action: {}
triple_press_action:
name: Triple Press Action
description: Action to run when the button is triple pressed
default: []
selector:
action: {}
quadruple_press_action:
name: Quadruple Press Action
description: Action to run when the button is quadruple pressed
default: []
selector:
action: {}
quintuple_press_action:
name: Quintuple Press Action
description: Action to run when the button is quintuple pressed
default: []
selector:
action: {}
triggers:
- trigger: event
event_type: zha_event
event_data:
command: off_short_release
device_id: !input device_id
actions:
- sequence: !input single_press_action
- wait_for_trigger:
- trigger: event
event_type: zha_event
event_data:
command: off_short_release
device_id: !input device_id
timeout:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
continue_on_timeout: false
- sequence: !input double_press_action
- wait_for_trigger:
- trigger: event
event_type: zha_event
event_data:
command: off_short_release
device_id: !input device_id
timeout:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
continue_on_timeout: false
- sequence: !input triple_press_action
- wait_for_trigger:
- trigger: event
event_type: zha_event
event_data:
command: off_short_release
device_id: !input device_id
timeout:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
continue_on_timeout: false
- sequence: !input quadruple_press_action
- wait_for_trigger:
- trigger: event
event_type: zha_event
event_data:
command: off_short_release
device_id: !input device_id
timeout:
hours: 0
minutes: 0
seconds: 1
milliseconds: 0
continue_on_timeout: false
- sequence: !input quintuple_press_action
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment