Lutron Caseta Pico 2-Button Remote (Core Integration Only)

[Update 1: added automation mode options (single, restart, queued or parallel)] based on @stephack’s recent enhancements

This blueprint allows the user to map actions to buttons on the Lutron Caseta four-button scene pico remote.

  • This works with the core Lutron Caseta integration only.
  • Works with two-button pico remote model PJ2-2B-GXX-X01 (Pico2Button) .
  • Supports press and release action for each button.

image

blueprint:
  name: BP - Pico2Button
  description: "This is for the 2 button picos that have the following model:\n\n
  PJ2-2B-GXX-X01 (Pico2Button)\n\nSelect an action for each button listed below. "
  domain: automation
  input:
    pico_remote:
      name: Pico Remote
      description: "Select the pico remote to configure:"
      selector:
        device:
          #integration: lutron_caseta
          model: PJ2-2B-GXX-X01 (Pico2Button)
    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: {}
    top_on_release:
      name: Top (On) Button Released
      description: "Execute when TOP button is RELEASED"
      default: []
      selector:
        action: {}
    bottom_off:
      name: Bottom (Off) Button Pressed
      description: "Execute when BOTTOM button is PRESSED"
      default: []
      selector:
        action: {}
    bottom_off_release:
      name: Bottom (Off) Button Released
      description: "Execute when BOTTOM button is RELEASED"
      default: []
      selector:
        action: {}
trigger:
  - platform: device
    device_id: !input pico_remote
    domain: lutron_caseta
    type: press
    subtype: 'on'
  - platform: device
    device_id: !input pico_remote
    domain: lutron_caseta
    type: press
    subtype: 'off'
  - platform: device
    device_id: !input pico_remote
    domain: lutron_caseta
    type: release
    subtype: 'on'
  - platform: device
    device_id: !input pico_remote
    domain: lutron_caseta
    type: release
    subtype: 'off'
condition: []
action:
  - choose:
      - conditions: '{{ trigger.event.data.action == "press" }}'
        sequence:
        - choose:
          - conditions: '{{ trigger.event.data.button_number == 2 }}'
            sequence: !input top_on
          - conditions: '{{ trigger.event.data.button_number == 4 }}'
            sequence: !input bottom_off
      - conditions: '{{ trigger.event.data.action == "release" }}'
        sequence:
        - choose:
          - conditions: '{{ trigger.event.data.button_number == 2 }}'
            sequence: !input top_on_release
          - conditions: '{{ trigger.event.data.button_number == 4 }}'
            sequence: !input bottom_off_release
    default: []
mode: !input auto_mode
max: !input mode_max

Based on the Lutron Caseta Pico (Core Integration Only) blueprint by @stephack.

4 Likes

I am new to Home Assistant so please do not be upset about this question.

How do I install this Blueprint. Usually Blueprints that I have installed have “click to preview” then install. I think this one has to be installed manually?

How do you do that?

I figured it out. I use the URL from this post. I watched Everything Smart Home on YouTube and he explained it well.

Thank you

1 Like

Thanks, @ogiewon! Here’s my version. Updated to include actions on a long press and a short press. It also uses trigger ID’s, which I think were introduced to HA after you shared your blueprint.

blueprint:
  name: Lutron Caseta Pico 2-button Remote
  description: Short and long press automations for the Pico 2-button remote
  domain: automation
  input:
    pico_remote:
      name: Pico Remote
      description: Select the Pico remote to configure
      selector:
        device:
          integration: lutron_caseta
          model: PJ2-2B-GXX-X01 (Pico2Button)
    on_short:
      name: Top (on) button - Short press
      description: Action to run on when the on button is briefly pressed
      default: []
      selector:
        action: {}
    off_short:
      name: Bottom (off) button - Short press
      description: Action to run on when the off button is briefly pressed
      default: []
      selector:
        action: {}
    on_long:
      name: Top (on) button - Long press
      description: Action to run on when the on button is held down
      default: []
      selector:
        action: {}
    off_long:
      name: Bottom (off) button - Long press
      description: Action to run on when the off button is held down
      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: 2
      selector:
        number:
          min: 0.0
          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_press
  - platform: device
    device_id: !input "pico_remote"
    domain: lutron_caseta
    type: press
    subtype: "off"
    id: off_press
condition: []
action:
  - choose:
      - conditions:
          - condition: trigger
            id: on_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: "{{ wait.trigger == none }}"
                sequence: !input "on_long"
            default: !input "on_short"
      - conditions:
          - condition: trigger
            id: off_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: "{{ wait.trigger == none }}"
                sequence: !input "off_long"
            default: !input "off_short"
    default: []
mode: !input "auto_mode"
max: !input "mode_max"
4 Likes

I’m trying to use this blueprint. I can import it successfully, but when I select “Pico Remote” it returns “No matching devices found.”

I have successfully added the picos to HA, can see then, and even create automations based on them. They just aren’t visible in this blueprint.

I know that 2022 October or November update created some problems with @stephack’s original pico blueprint. (See post here and then here.) This looks like it was resolved in 2022.12.0, but I don’t understand what the problem was or if it’s impacted this blueprint.

Any help would be appreciated!

Following some advice from @stephack in this post many months back, I just updated my blueprint in the first post to comment out the ‘integration’ line below.

      selector:
        device:
          #integration: lutron_caseta
          model: PJ2-2B-GXX-X01 (Pico2Button)

Let me know if that solves the issue or not.

I am not currently using any Pico remotes directly with Home Assistant, which is why I have not been on top of any of these issues over the past few months.

That worked perfectly! Thanks so much.

1 Like