Forked from EmilZackrisson/philips_hue_switch_rwl022.yaml
Last active
April 20, 2022 20:10
-
-
Save hlipnick/5568ef6f2cd205384a3c4fa2ec107959 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint for Philips Hue Switch RWL022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
blueprint: | |
name: ZHA - Philips Hue Dimmer Switch RWL020 | |
description: | | |
Choose what all four buttons will do. | |
domain: automation | |
input: | |
remote: | |
name: Remote | |
description: Choose the remote | |
selector: | |
device: | |
integration: zha | |
entity: | |
domain: sensor | |
device_class: battery | |
button_1_single_press: | |
name: On - Single Press | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
button_1_long_press: | |
name: On - Long Press | |
description: Action to run on long press | |
default: [] | |
selector: | |
action: {} | |
button_1_double_press: | |
name: On - Double Press | |
description: Action to run on double press | |
default: [] | |
selector: | |
action: {} | |
button_2_single_press: | |
name: Dim Up - Single Press | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
button_2_long_press: | |
name: Dim Up - Long Press | |
description: Action to run on long press | |
default: [] | |
selector: | |
action: {} | |
button_2_double_press: | |
name: Dim Up - Double Press | |
description: Action to run on double press | |
default: [] | |
selector: | |
action: {} | |
button_3_single_press: | |
name: Dim Down - Single Press | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
button_3_long_press: | |
name: Dim Down - Long Press | |
description: Action to run on long press | |
default: [] | |
selector: | |
action: {} | |
button_3_double_press: | |
name: Dim Down - Double Press | |
description: Action to run on double press | |
default: [] | |
selector: | |
action: {} | |
button_4_single_press: | |
name: Off - Single Press | |
description: Action to run on single press | |
default: [] | |
selector: | |
action: {} | |
button_4_long_press: | |
name: Off - Long Press | |
description: Action to run on long press | |
default: [] | |
selector: | |
action: {} | |
button_4_double_press: | |
name: Off - Double Press | |
description: Action to run on double press | |
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 }}" | |
- choose: | |
- conditions: | |
- "{{ command == 'on_short_release' }}" | |
sequence: !input "button_1_single_press" | |
- conditions: | |
- "{{ command == 'on_hold' }}" | |
sequence: !input "button_1_long_press" | |
- conditions: | |
- "{{ command == 'on_double_press' }}" | |
sequence: !input "button_1_double_press" | |
- conditions: | |
- "{{ command == 'up_short_release' }}" | |
sequence: !input "button_2_single_press" | |
- conditions: | |
- "{{ command == 'up_hold' }}" | |
sequence: !input "button_2_long_press" | |
- conditions: | |
- "{{ command == 'up_double_press' }}" | |
sequence: !input "button_2_double_press" | |
- conditions: | |
- "{{ command == 'down_short_release' }}" | |
sequence: !input "button_3_single_press" | |
- conditions: | |
- "{{ command == 'down_hold' }}" | |
sequence: !input "button_3_long_press" | |
- conditions: | |
- "{{ command == 'down_double_press' }}" | |
sequence: !input "button_3_double_press" | |
- conditions: | |
- "{{ command == 'off_short_release' }}" | |
sequence: !input "button_4_single_press" | |
- conditions: | |
- "{{ command == 'off_hold' }}" | |
sequence: !input "button_4_long_press" | |
- conditions: | |
- "{{ command == 'off_double_press' }}" | |
sequence: !input "button_4_double_press" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment