-
-
Save DarkCoder28/183dad85cc971fda637a0f0e1e5c5e3d to your computer and use it in GitHub Desktop.
This file contains 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: Philips Hue Dimmer RWL022 (Aiden Edition) | |
description: | |
"Control lights with a Philips Hue Dimmer Switch (v2).\nPower will toggle the state, Dim Up will brighten the light (double press sets full brightness), Dim Down will dim the light, & Hue will flash the light to make sure it works\n\n Blueprint\ | |
\ Version: 1" | |
domain: automation | |
input: | |
remote: | |
name: Philips Hue Dimmer Switch | |
description: Pick a RWL022 Dimmer Switch | |
selector: | |
device: | |
integration: zha | |
entity: | |
domain: sensor | |
device_class: battery | |
light: | |
name: The light entity to control. | |
description: The light entity (Can be a light group) to control. | |
selector: | |
entity: | |
domain: light | |
# multiple: true | |
source_url: https://gist.github.com/DarkCoder28/183dad85cc971fda637a0f0e1e5c5e3d | |
mode: restart | |
max_exceeded: silent | |
variables: | |
light: !input "light" | |
trigger: | |
- platform: event | |
event_type: zha_event | |
event_data: | |
device_id: !input "remote" | |
cluster_id: 64512 | |
action: | |
- variables: { command: "{{ trigger.event.data.command }}" } | |
- choose: | |
- conditions: "{{ command == 'on_press' }}" | |
sequence: | |
- service: light.toggle | |
target: | |
entity_id: !input "light" | |
- conditions: "{{ command == 'up_double_press' }}" | |
sequence: | |
- service: light.turn_on | |
target: | |
entity_id: !input "light" | |
data: | |
brightness_pct: 100 | |
- conditions: | |
- condition: or | |
conditions: | |
- condition: template | |
value_template: "{{ command == 'up_press' }}" | |
- condition: template | |
value_template: "{{ command == 'up_hold' }}" | |
sequence: | |
- service: light.turn_on | |
target: | |
entity_id: !input "light" | |
data: | |
brightness_step_pct: 10 | |
- conditions: | |
- condition: or | |
conditions: | |
- condition: template | |
value_template: "{{ command == 'down_press' }}" | |
- condition: template | |
value_template: "{{ command == 'down_hold' }}" | |
sequence: | |
- service: light.turn_on | |
target: | |
entity_id: !input "light" | |
data: | |
brightness_step_pct: -10 | |
- conditions: "{{ command == 'off_press' }}" | |
sequence: | |
- service: light.turn_on | |
target: | |
entity_id: !input "light" | |
data: | |
flash: short | |
# on_press, on_hold, on_long_release, on_double_press | |
# up_press, up_hold, up_long_release, up_double_press | |
# down_press, down_hold, down_long_release, down_double_press | |
# off_press, off_hold, off_long_release, off_double_press |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment