Last active
January 24, 2022 20:30
-
-
Save StevenSeifried/38ed78a8a921b14d25c6494ca6d58465 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 v1 Smart Dimmer Switch and Remote | |
description: Philips Hue Dimmer v1 (RWL021) using Zigbee Home Automation | |
input: | |
zha_device: | |
name: Philips Hue v1 Smart Dimmer Switch and Remote | |
description: List of available Philips Hue v1 devices | |
selector: | |
device: | |
integration: zha | |
manufacturer: Philips | |
model: RWL021 | |
On_Press: | |
name: On Press | |
description: On 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 | |
Off_Press: | |
name: Off Press | |
description: Off button pressed | |
default: [] | |
selector: | |
action: null | |
On_HoldPress: | |
name: On Hold | |
description: On 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 | |
Off_HoldPress: | |
name: Off Hold | |
description: Off 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 "On_Press" | |
- conditions: '{{ command_type == "on_hold" }}' | |
sequence: !input "On_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 "Off_Press" | |
- conditions: '{{ command_type == "off_hold" }}' | |
sequence: !input "Off_HoldPress" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment