Last active
January 24, 2022 20:32
-
-
Save StevenSeifried/6fd06d3cd98582f0be27de1f347128c1 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: | |
domain: automation | |
name: Philips Hue v2 Smart Dimmer Switch and Remote | |
description: Philips Hue Dimmer v2 (RWL022) using Zigbee Home Automation | |
input: | |
zha_device: | |
name: Philips Hue v2 Smart Dimmer Switch and Remote | |
description: List of available Philips Hue v2 devices | |
selector: | |
device: | |
integration: zha | |
manufacturer: Signify Netherlands B.V. | |
model: RWL022 | |
Power_Press: | |
name: Power Press | |
description: Power button pressed | |
default: [] | |
selector: | |
action: null | |
Up_Press: | |
name: Up Press | |
description: Up button pressed | |
default: [] | |
selector: | |
action: null | |
Down_Press: | |
name: Down Press | |
description: Down button pressed | |
default: [] | |
selector: | |
action: null | |
Hue_Press: | |
name: Hue Press | |
description: Hue button pressed | |
default: [] | |
selector: | |
action: null | |
Power_HoldPress: | |
name: Power Hold | |
description: Power button held down | |
default: [] | |
selector: | |
action: null | |
Up_HoldPress: | |
name: Up Hold | |
description: Up button held down | |
default: [] | |
selector: | |
action: null | |
Down_HoldPress: | |
name: Down Hold | |
description: Down button held down | |
default: [] | |
selector: | |
action: null | |
Hue_HoldPress: | |
name: Hue Hold | |
description: Hue button held down | |
default: [] | |
selector: | |
action: null | |
mode: single | |
max_exceeded: silent | |
variables: | |
device_id: !input "zha_device" | |
trigger: | |
- platform: event | |
event_type: zha_event | |
condition: "{{ trigger.event.data.device_id == device_id }}" | |
action: | |
- variables: | |
button: "{{ trigger.event.data.args.button }}" | |
press_type: "{{ trigger.event.data.args.press_type }}" | |
command_type: "{{ trigger.event.data.command }}" | |
- service: logbook.log | |
data: | |
name: Button | |
message: "{{ button }}" | |
- service: logbook.log | |
data: | |
name: Press Type | |
message: "{{ press_type }}" | |
- service: logbook.log | |
data: | |
name: Device | |
message: "{{ zha_device }}" | |
- service: logbook.log | |
data: | |
name: Command | |
message: "{{ command_type }}" | |
- choose: | |
- conditions: '{{ command_type == "on_press" }}' | |
sequence: !input "Power_Press" | |
- conditions: '{{ command_type == "on_hold" }}' | |
sequence: !input "Power_HoldPress" | |
- conditions: '{{ command_type == "up_press" }}' | |
sequence: !input "Up_Press" | |
- conditions: '{{ command_type == "up_hold" }}' | |
sequence: !input "Up_HoldPress" | |
- conditions: '{{ command_type == "down_press" }}' | |
sequence: !input "Down_Press" | |
- conditions: '{{ command_type == "down_hold" }}' | |
sequence: !input "Down_HoldPress" | |
- conditions: '{{ command_type == "off_press" }}' | |
sequence: !input "Hue_Press" | |
- conditions: '{{ command_type == "off_hold" }}' | |
sequence: !input "Hue_HoldPress" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment