Hello! This is my first blueprint, is based on the work of @Stephack Here.
This could work as a universal pico remote solution but I have only radioRa2 to test it.
This is intended to work with the 5 button pico (on, off, raise, lower, favorite)
I’ll publish another designed to work as a media player controller.
Enjoy and help me to improve it!
blueprint:
name: RadioRa2 Pico 5 button raise-lower automation
description: "This is for the 5 button picos that have the following model:\n\n
PJ2-3BRL-GXX-X01 (Pico3ButtonRaiseLower)\n\nSelect an action for each button listed below. Based on the work of stephack"
domain: automation
input:
pico_remote:
name: NameOfPico
description: "Go to Developers Tools--> Events --> Listen event: lutron_event --> start listen. Push a button of your pico and write here the name on data:id: (without quotes) and without the last underscore and word (ex. without _favorite or last word)"
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
top_on:
name: Top (On) Button Pressed
description: "Execute when TOP button is PRESSED"
default: []
selector:
action: {}
up_raise:
name: Up (Raise) Arrow Button Pressed
description: "Execute when UP button is PRESSED"
default: []
selector:
action: {}
up_raise_release:
name: Up (Raise) Arrow Button Released
description: "Execute when UP button is RELEASED"
default: []
selector:
action: {}
middle_stop:
name: Middle (Fav) Button Pressed
description: "Execute when MIDDLE button is PRESSED"
default: []
selector:
action: {}
down_lower:
name: Down (Lower) Arrow Button Pressed
description: "Execute when DOWN button is PRESSED"
default: []
selector:
action: {}
down_lower_release:
name: Down (Lower) Arrow Button Released
description: "Execute when DOWN button is RELEASED"
default: []
selector:
action: {}
bottom_off:
name: Bottom (Off) Button Pressed
description: "Execute when BOTTOM button is PRESSED"
default: []
selector:
action: {}
variables:
pico_name: !input pico_remote
trigger:
- platform: event
event_type: lutron_event
condition:
- condition: template
value_template: '{{ pico_name in trigger.event.data.id }}'
action:
- choose:
- conditions:
- condition: template
value_template: >-
{{ trigger.event.data.action == "single" or
trigger.event.data.action == "pressed" }}
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ "_off" in trigger.event.data.id }}'
sequence: !input bottom_off
- conditions:
- condition: template
value_template: '{{ "_favorite" in trigger.event.data.id }}'
sequence: !input middle_stop
- conditions:
- condition: template
value_template: '{{ "_on" in trigger.event.data.id }}'
sequence: !input top_on
- conditions:
- condition: template
value_template: '{{ "_raise" in trigger.event.data.id }}'
sequence: !input up_raise
- conditions:
- condition: template
value_template: '{{ "_lower" in trigger.event.data.id }}'
sequence: !input down_lower
default: []
- conditions:
- condition: template
value_template: '{{ trigger.event.data.action == "released" }}'
sequence:
- choose:
- conditions:
- condition: template
value_template: '{{ "_raise" in trigger.event.data.id }}'
sequence: !input up_raise_release
- conditions:
- condition: template
value_template: '{{ "_lower" in trigger.event.data.id }}'
sequence: !input down_lower_release
default: []
default: []
mode: !input auto_mode
max: !input mode_max