Instantly share code, notes, and snippets.
Forked from crkochan/4button-pico-bp.yaml
Last active
March 21, 2023 05:10
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save lilyball/76d84b7e33c26066e98f4a52cc712ad1 to your computer and use it in GitHub Desktop.
Home Assistant Blueprint
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: Lutron Caseta Four-Button Zone Pico Actions | |
description: Short and long press automations for the Pico four-button remote. | |
domain: automation | |
input: | |
pico_remote: | |
name: Pico Four-Button Zone Remote | |
description: Select the Pico four-button zone remote to configure. | |
selector: | |
device: | |
model: PJ2-4B-GXX-X01 (Pico4ButtonZone) | |
on_button_press: | |
name: On Button - Short press | |
description: Action when the on button is pressed. | |
default: [] | |
selector: | |
action: {} | |
on_button_hold: | |
name: On Button - Long press | |
description: Action when the on button is held. | |
default: [] | |
selector: | |
action: {} | |
on_button_release: | |
name: On Button - Release | |
description: Action when the on button is released. | |
default: [] | |
selector: | |
action: {} | |
raise_button_press: | |
name: Raise Button - Short press | |
description: Action when the raise button is pressed. | |
default: [] | |
selector: | |
action: {} | |
raise_button_hold: | |
name: Raise Button - Long press | |
description: Action when the raise button is held. | |
default: [] | |
selector: | |
action: {} | |
raise_button_release: | |
name: Raise Button - Release | |
description: Action when the raise button is released. | |
default: [] | |
selector: | |
action: {} | |
lower_button_press: | |
name: Lower Button - Short press | |
description: Action when the lower button is pressed. | |
default: [] | |
selector: | |
action: {} | |
lower_button_hold: | |
name: Lower Button - Long press | |
description: Action when the lower button is held. | |
default: [] | |
selector: | |
action: {} | |
lower_button_release: | |
name: Lower Button - Released | |
description: Action when the lower button is released. | |
default: [] | |
selector: | |
action: {} | |
off_button_press: | |
name: Off Button - Short Press | |
description: Action when the off button is pressed. | |
default: [] | |
selector: | |
action: {} | |
off_button_hold: | |
name: Off Button - Long Press | |
description: Action when the off button is held. | |
default: [] | |
selector: | |
action: {} | |
off_button_release: | |
name: Off Button - Release | |
description: Action when the off button is released. | |
default: [] | |
selector: | |
action: {} | |
time_before_long_press: | |
name: Time before long press | |
description: Amount of time button needs to be held before triggering "long press" action. | |
default: 1 | |
selector: | |
number: | |
min: 0.25 | |
max: 10.0 | |
step: 0.25 | |
unit_of_measurement: seconds | |
mode: slider | |
auto_mode: | |
name: Automation Mode | |
description: Mode that automation runs in (single, restart, queued, parallel). | |
default: restart | |
selector: | |
select: | |
options: | |
- single | |
- restart | |
- queued | |
- parallel | |
mode_max: | |
name: Mode Max (ignored by Single and Restart Modes) | |
description: Maximum number of runs that can be executed or queued at a time. | |
default: 10 | |
selector: | |
number: | |
min: 1 | |
max: 15 | |
trigger: | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: press | |
subtype: 'on' | |
id: on_button_press | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'on' | |
id: on_button_release | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: press | |
subtype: 'raise' | |
id: raise_button_press | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'raise' | |
id: on_button_release | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: press | |
subtype: 'lower' | |
id: lower_button_press | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'lower' | |
id: lower_button_release | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: press | |
subtype: 'off' | |
id: off_button_press | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'off' | |
id: off_button_release | |
action: | |
- choose: | |
# On button press | |
- conditions: | |
- condition: trigger | |
id: on_button_press | |
sequence: | |
- wait_for_trigger: | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'on' | |
timeout: !input time_before_long_press | |
- choose: | |
- conditions: | |
- condition: template | |
value_template: "{{ not wait.trigger }}" | |
sequence: !input on_button_hold | |
default: !input on_button_press | |
# On button release | |
- conditions: | |
- condition: trigger | |
id: on_button_release | |
sequence: !input on_button_release | |
# Raise button press | |
- conditions: | |
- condition: trigger | |
id: raise_button_press | |
sequence: | |
- wait_for_trigger: | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'raise' | |
timeout: !input time_before_long_press | |
- choose: | |
- conditions: | |
- condition: template | |
value_template: "{{ not wait.trigger }}" | |
sequence: !input raise_button_hold | |
default: !input raise_button_press | |
# Raise button release | |
- conditions: | |
- condition: trigger | |
id: raise_button_release | |
sequence: !input raise_button_release | |
# Lower button press | |
- conditions: | |
- condition: trigger | |
id: lower_button_press | |
sequence: | |
- wait_for_trigger: | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'lower' | |
timeout: !input time_before_long_press | |
- choose: | |
- conditions: | |
- condition: template | |
value_template: "{{ not wait.trigger }}" | |
sequence: !input lower_button_hold | |
default: !input lower_button_press | |
# Lower button release | |
- conditions: | |
- condition: trigger | |
id: lower_button_release | |
sequence: !input lower_button_release | |
# Off button press | |
- conditions: | |
- condition: trigger | |
id: off_button_press | |
sequence: | |
- wait_for_trigger: | |
- platform: device | |
device_id: !input pico_remote | |
domain: lutron_caseta | |
type: release | |
subtype: 'off' | |
timeout: !input time_before_long_press | |
- choose: | |
- conditions: | |
- condition: template | |
value_template: "{{ not wait.trigger }}" | |
sequence: !input off_button_hold | |
default: !input off_button_press | |
# Off button release | |
- conditions: | |
- condition: trigger | |
id: off_button_release | |
sequence: !input off_button_release | |
default: [] | |
mode: !input auto_mode | |
max: !input mode_max |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment