Instantly share code, notes, and snippets.
Last active
October 23, 2025 14:38
-
Star
0
(0)
You must be signed in to star a gist -
Fork
3
(3)
You must be signed in to fork a gist
-
Save manix84/7c9cccac1f498b6b0fa134054f86ecab to your computer and use it in GitHub Desktop.
Hue Remote Lights (ZHA Integration) - A remote control mapper for the Philips Hue Remotes (RWL020, RWL021, and 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: Hue Remote Mapper (ZHA Integration) | |
| description: | | |
| A remote control mapper for the Philips Hue Remotes (RWL020, RWL021, and RWL022).blueprint: | |
| domain: automation | |
| source_url: https://gist.github.com/manix84/7c9cccac1f498b6b0fa134054f86ecab | |
| author: Manix84 | |
| input: | |
| dimmer_device_id: | |
| name: Dimmer Remote Device | |
| description: "Your Hue dimmer remote (e.g. RWL020, RWL021, RWL022); check Hue integration and/or Hue app if you don't know the name" | |
| selector: | |
| device: | |
| filter: | |
| - integration: zha | |
| manufacturer: "Philips" | |
| model: RWL020 | |
| - integration: zha | |
| manufacturer: "Philips" | |
| model: RWL021 | |
| - integration: zha | |
| manufacturer: "Philips" | |
| model: RWL022 | |
| button1_actions: | |
| name: On Button | |
| icon: mdi:numeric-1-box-outline | |
| collapsed: true | |
| input: | |
| btn1_single_press_action: | |
| name: Single Press Actions | |
| description: <ha-icon icon="mdi:numeric-1-box"></ha-icon> Actions to run, when button is pressed quickly. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn1_double_press_action: | |
| name: Double (2) Press Actions | |
| description: <ha-icon icon="mdi:numeric-2-box-multiple"></ha-icon> Actions to run, when button is pressed quickly twice. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn1_triple_press_action: | |
| name: Triple (3) Press Actions | |
| description: <ha-icon icon="mdi:numeric-3-box-multiple"></ha-icon> Actions to run, when button is pressed quickly three times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn1_quadruple_press_action: | |
| name: Quadruple (4) Press Actions | |
| description: <ha-icon icon="mdi:numeric-4-box-multiple"></ha-icon> Actions to run, when button is pressed quickly four times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn1_quintuple_press_action: | |
| name: Quintuple (5) Press Actions | |
| description: <ha-icon icon="mdi:numeric-5-box-multiple"></ha-icon> Actions to run, when button is pressed quickly five times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn1_long_press_action: | |
| name: Long Press Actions | |
| description: <ha-icon icon="mdi:checkbox-multiple-blank"></ha-icon> Actions to run, when button is pressed and released after over a second. | |
| default: [] | |
| selector: | |
| action: {} | |
| button2_actions: | |
| name: Dim Up Button | |
| icon: mdi:chevron-up-box-outline | |
| collapsed: true | |
| input: | |
| btn2_single_press_action: | |
| name: Single Press Actions | |
| description: <ha-icon icon="mdi:numeric-1-box"></ha-icon> Actions to run, when button is pressed quickly. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn2_double_press_action: | |
| name: Double (2) Press Actions | |
| description: <ha-icon icon="mdi:numeric-2-box-multiple"></ha-icon> Actions to run, when button is pressed quickly twice. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn2_triple_press_action: | |
| name: Triple (3) Press Actions | |
| description: <ha-icon icon="mdi:numeric-3-box-multiple"></ha-icon> Actions to run, when button is pressed quickly three times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn2_quadruple_press_action: | |
| name: Quadruple (4) Press Actions | |
| description: <ha-icon icon="mdi:numeric-4-box-multiple"></ha-icon> Actions to run, when button is pressed quickly four times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn2_quintuple_press_action: | |
| name: Quintuple (5) Press Actions | |
| description: <ha-icon icon="mdi:numeric-5-box-multiple"></ha-icon> Actions to run, when button is pressed quickly five times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn2_long_press_action: | |
| name: Long Press Actions | |
| description: <ha-icon icon="mdi:checkbox-multiple-blank"></ha-icon> Actions to run, when button is pressed and released after over a second. | |
| default: [] | |
| selector: | |
| action: {} | |
| button3_actions: | |
| name: Dim Down Button | |
| icon: mdi:chevron-down-box-outline | |
| collapsed: true | |
| input: | |
| btn3_single_press_action: | |
| name: Single Press Actions | |
| description: <ha-icon icon="mdi:numeric-1-box"></ha-icon> Actions to run, when button is pressed quickly. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn3_double_press_action: | |
| name: Double (2) Press Actions | |
| description: <ha-icon icon="mdi:numeric-2-box-multiple"></ha-icon> Actions to run, when button is pressed quickly twice. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn3_triple_press_action: | |
| name: Triple (3) Press Actions | |
| description: <ha-icon icon="mdi:numeric-3-box-multiple"></ha-icon> Actions to run, when button is pressed quickly three times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn3_quadruple_press_action: | |
| name: Quadruple (4) Press Actions | |
| description: <ha-icon icon="mdi:numeric-4-box-multiple"></ha-icon> Actions to run, when button is pressed quickly four times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn3_quintuple_press_action: | |
| name: Quintuple (5) Press Actions | |
| description: <ha-icon icon="mdi:numeric-5-box-multiple"></ha-icon> Actions to run, when button is pressed quickly five times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn3_long_press_action: | |
| name: Long Press Actions | |
| description: <ha-icon icon="mdi:checkbox-multiple-blank"></ha-icon> Actions to run, when button is pressed and released after over a second. | |
| default: [] | |
| selector: | |
| action: {} | |
| button4_actions: | |
| name: Off Button | |
| icon: mdi:numeric-0-box-outline | |
| collapsed: true | |
| input: | |
| btn4_single_press_action: | |
| name: Single Press Actions | |
| description: <ha-icon icon="mdi:numeric-1-box"></ha-icon> Actions to run, when button is pressed quickly. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn4_double_press_action: | |
| name: Double (2) Press Actions | |
| description: <ha-icon icon="mdi:numeric-2-box-multiple"></ha-icon> Actions to run, when button is pressed quickly twice. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn4_triple_press_action: | |
| name: Triple (3) Press Actions | |
| description: <ha-icon icon="mdi:numeric-3-box-multiple"></ha-icon> Actions to run, when button is pressed quickly three times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn4_quadruple_press_action: | |
| name: Quadruple (4) Press Actions | |
| description: <ha-icon icon="mdi:numeric-4-box-multiple"></ha-icon> Actions to run, when button is pressed quickly four times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn4_quintuple_press_action: | |
| name: Quintuple (5) Press Actions | |
| description: <ha-icon icon="mdi:numeric-5-box-multiple"></ha-icon> Actions to run, when button is pressed quickly five times. | |
| default: [] | |
| selector: | |
| action: {} | |
| btn4_long_press_action: | |
| name: Long Press Actions | |
| description: <ha-icon icon="mdi:checkbox-multiple-blank"></ha-icon> Actions to run, when button is pressed and released after over a second. | |
| default: [] | |
| selector: | |
| action: {} | |
| description: "" | |
| trigger: | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: on_press | |
| id: bnt1_single_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: on_double_press | |
| id: bnt1_double_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: on_triple_press | |
| id: bnt1_triple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: on_quadruple_press | |
| id: bnt1_quadruple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: on_quintuple_press | |
| id: bnt1_quintuple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: on_long_release | |
| id: bnt1_long_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: up_press | |
| id: bnt2_single_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: up_double_press | |
| id: bnt2_double_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: up_triple_press | |
| id: bnt2_triple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: up_quadruple_press | |
| id: bnt2_quadruple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: up_quintuple_press | |
| id: bnt2_quintuple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: up_long_release | |
| id: bnt2_long_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: down_press | |
| id: bnt3_single_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: down_double_press | |
| id: bnt3_double_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: down_triple_press | |
| id: bnt3_triple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: down_quadruple_press | |
| id: bnt3_quadruple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: down_quintuple_press | |
| id: bnt3_quintuple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: down_long_release | |
| id: bnt3_long_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: off_press | |
| id: bnt4_single_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: off_double_press | |
| id: bnt4_double_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: off_triple_press | |
| id: bnt4_triple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: off_quadruple_press | |
| id: bnt4_quadruple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: off_quintuple_press | |
| id: bnt4_quintuple_press | |
| - platform: event | |
| event_type: zha_event | |
| event_data: | |
| device_id: !input dimmer_device_id | |
| command: off_long_release | |
| id: bnt4_long_press | |
| condition: [] | |
| action: | |
| - choose: | |
| - alias: On Button - Single Press | |
| conditions: | |
| - condition: trigger | |
| id: btn1_single_press | |
| enabled: true | |
| sequence: | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn1_single_press_action | |
| - alias: On Button - Double Press | |
| conditions: | |
| - condition: trigger | |
| id: double_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: double_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn1_double_press_action | |
| - alias: On Button - Triple Press | |
| conditions: | |
| - condition: trigger | |
| id: triple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: triple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn1_triple_press_action | |
| - alias: On Button - Quadruple Press | |
| conditions: | |
| - condition: trigger | |
| id: quadruple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quadruple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn1_quadruple_press_action | |
| - alias: On Button - Quintuple Press | |
| conditions: | |
| - condition: trigger | |
| id: quintuple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quintuple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn1_quintuple_press_action | |
| - alias: On Button - Long Press | |
| conditions: | |
| - condition: trigger | |
| id: long_press | |
| enabled: true | |
| sequence: !input btn1_long_press_action | |
| - alias: Dim Up Button - Single Press | |
| conditions: | |
| - condition: trigger | |
| id: btn2_single_press | |
| enabled: true | |
| sequence: | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn2_single_press_action | |
| - alias: Dim Up Button - Double Press | |
| conditions: | |
| - condition: trigger | |
| id: double_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: double_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn2_double_press_action | |
| - alias: Dim Up Button - Triple Press | |
| conditions: | |
| - condition: trigger | |
| id: triple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: triple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn2_triple_press_action | |
| - alias: Dim Up Button - Quadruple Press | |
| conditions: | |
| - condition: trigger | |
| id: quadruple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quadruple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn2_quadruple_press_action | |
| - alias: Dim Up Button - Quintuple Press | |
| conditions: | |
| - condition: trigger | |
| id: quintuple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quintuple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn2_quintuple_press_action | |
| - alias: Dim Up Button - Long Press | |
| conditions: | |
| - condition: trigger | |
| id: long_press | |
| enabled: true | |
| sequence: !input btn2_long_press_action | |
| - alias: Dim Down Button - Single Press | |
| conditions: | |
| - condition: trigger | |
| id: btn3_single_press | |
| enabled: true | |
| sequence: | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn3_single_press_action | |
| - alias: Dim Down Button - Double Press | |
| conditions: | |
| - condition: trigger | |
| id: double_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: double_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn3_double_press_action | |
| - alias: Dim Down Button - Triple Press | |
| conditions: | |
| - condition: trigger | |
| id: triple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: triple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn3_triple_press_action | |
| - alias: Dim Down Button - Quadruple Press | |
| conditions: | |
| - condition: trigger | |
| id: quadruple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quadruple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn3_quadruple_press_action | |
| - alias: Dim Down Button - Quintuple Press | |
| conditions: | |
| - condition: trigger | |
| id: quintuple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quintuple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn3_quintuple_press_action | |
| - alias: Dim Down Button - Long Press | |
| conditions: | |
| - condition: trigger | |
| id: long_press | |
| enabled: true | |
| sequence: !input btn3_long_press_action | |
| - alias: Off Button - Single Press | |
| conditions: | |
| - condition: trigger | |
| id: btn4_single_press | |
| enabled: true | |
| sequence: | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn4_single_press_action | |
| - alias: Off Button - Double Press | |
| conditions: | |
| - condition: trigger | |
| id: double_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: double_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn4_double_press_action | |
| - alias: Off Button - Triple Press | |
| conditions: | |
| - condition: trigger | |
| id: triple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: triple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn4_triple_press_action | |
| - alias: Off Button - Quadruple Press | |
| conditions: | |
| - condition: trigger | |
| id: quadruple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quadruple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn4_quadruple_press_action | |
| - alias: Off Button - Quintuple Press | |
| conditions: | |
| - condition: trigger | |
| id: quintuple_press | |
| enabled: true | |
| sequence: | |
| - variables: | |
| action: quintuple_press | |
| - choose: | |
| - conditions: [] | |
| sequence: !input btn4_quintuple_press_action | |
| - alias: Off Button - Long Press | |
| conditions: | |
| - condition: trigger | |
| id: long_press | |
| enabled: true | |
| sequence: !input btn4_long_press_action | |
| default: | |
| - service: persistent_notification.create | |
| data: | |
| message: >- | |
| Hue dimmer ran default event from "choose" action on button press! | |
| Please check any automations which may not be handling this event: {{ trigger.id }} | |
| notification_id: hue-remote-lights | |
| title: >- | |
| Uncaught Dimmer Command ({{ trigger.id }}) | |
| mode: single |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment