Another Blueprint for Lutron 5 button Pico with press and hold for dimming function

This blueprint allows for the association of up to four Lutron Pico 5 Button (model PJ2-3BRL-GXX-X01) remotes with one or more light entities. It is designed to simulate the operation of a standard Lutron Caseta wall dimmer including the press and hold functionality for the raise/lower buttons. It allows for the control over the on/off transition times, brightness step percentage and transition time, and the assignment of action(s) to the middle button.

PicoWirelessComp_01_hero

Open your Home Assistant instance and show the blueprint import dialog with a specific blueprint pre-filled.

UPDATE:

I have located the issue with 2022.12.0. It appears that something was changed with the handling of blank device ids with respect to automations. I have updated the link with a fix. However, the support for multiple Picos has been disabled. Therefore, if you created an automation with more that one Pico, you will have to now create additional automations.

A bit more detail:

In order to allow for the control of a single set of entities by more than one Pico, I used the ā€˜enabledā€™ variable in order to tell HA whether to pay attention to Picos 2, 3, and 4 of the automation. The Pico device was left blank but the ā€˜enabledā€™ variable was false, so no harm. Like thisā€¦

trigger:
ā€¦

  • enabled: !input enabled_2
    platform: device
    device_id: !input pico_2
    domain: lutron_caseta
    type: press
    subtype: ā€˜onā€™
    id: on_pressed
    ā€¦

It appears that, as of 2022.12.0, even though a trigger is not enabled, you can no longer have a blank device_id in the automation.

I will try to figure out a workaround, but for now, the ability to specify more that one Pico in this automation has be disabled.

You will need to redownload the blueprint.

5 Likes

This is great, and very timely for me! I use hubitat for ZigBee and Zwave devices and Iā€™m moving my lutron integration from hubitat to HA. This was so easy to setup and works wonderfully. Now if I could make a requestā€¦ Iā€™d like to be able to setup separate targets/events for the top and bottom buttons, and then direct the raise lower buttons as well. For example, my previous usage in hubitat was to toggle my bedside lamp with the top button. The bottom button toggled my wifeā€™s bedside lamp. Raise and lower adjusted the brightness of my bedside lamp, and the middle button toggled another light. There is another pico blueprint available that allows the different assignments, but it doesnā€™t support press and hold like yours does for the dimming. Is that something you could do? It might be better as a separate blueprint as Iā€™m sure many would like the simplicity of this one. I myself will use this one for many of my picos, but Iā€™d like the additional options in some cases. In any case, thank you!

I took a look at the blueprint and decided to just make the modifications myself. I havenā€™t done blueprints before, but it was trivial given the excellent starting point from you. So no need to address my request unless you just want to for the sake of others. If youā€™d like my blueprint or would like me to publish it then let me know. Its your code really so I wonā€™t do so unless you ask me too. Thanks again!

1 Like

The press and hold functionality must be tied to a specific entity or set of entities. What you are asking for is definitely doable, but Iā€™d probably create a separate blueprint for it just to keep this one clean.

Thank you @tombruno for the wonderful blueprint! This is exactly something I have been searching for, for quite some time! I did want to note a bug I discoveredā€¦ I noticed the seemingly random case where when you turn the lights off, they will come right back on. I checked Lutron to see all button press events, and it only shows off pressed, and releasedā€¦ Yet when viewing the controlled entity history, it shows this automation turning the lights right back on (by lutron_caseta_button_event).
This is not reliably reproducible, but does happen on average ~20% of the time. I canā€™t pinpoint what causes it yet. I found it does not happen any more, or less, when dimming was used, nor when controlling the lights ā€œquicklyā€. The lights can be on for some time, and when turned off, on occasion they will come right back on.
If you have any thoughts on resolving this, I would be happy to hear them! I will work on it myself, as well.

Thanks again for the great work!

Updateā€¦ After spending some time on this, and trying numerous modifications to this blueprint, I was still experiencing the issue of lights turning themselves back on on a regular basis.

I can only guess that this issue stems from the ā€œrepeatingā€ nature of this automation. And that this is possibly a bug in HA vs. the blueprint itself. Not sureā€¦

My resolution was to delete all ON/OFF functionality from this blueprint, and have separate (single run) automations for those commands. However, I still use this blueprint for all Raise/Lower button presses, due to how well this blueprint is crafted.

This fix isnā€™t nearly as clean as this single blueprint, requiring 3 separate automations for each Pico device, however the ability to include smooth dimming is far superior to anything else I have used.

Thanks again for your work on this, it was very helpful! :slight_smile:

I will take a look at the issue and see if I can replicate. Sorry for the delayed responseā€“been dealing with hurricane Ian aftermath.

To control multiple light entities, is it better to create a separate automation for each one? Or to create a group in HA and then control the group using the automation?

Also I donā€™t quite understand the restriction listed at the top? If I create an automation using this blueprint, and then I want a SECOND Pico remote to control the same entities, I would have to recreate the automation? I donā€™t see where I can assign multiple Picos or multiple entities in the first place.

Itā€™s really up to you with respect to using groups or listing individual light entities. My rule of thumb is to create a group when I have more than one use for it. If my only need for the group is a single automation, I simply list out the entities in that automation with the following exception: if the group is comprised of a set of Zigbee bulbs, I create a group within the ZHA integration to avoid the ā€œpopcornā€ effect.

As for the restriction, you only need to recreate the automation if you decide to eliminate a Pico. Adding Picos works fine. There is a bug in the Front-end of Home Assistant with the use of Boolean inputs in Blueprints that has yet to be fixed. Hopefully it will be resolved one of these days.

That makes sense. Oddly enough, I donā€™t see an option to add additional PICOs - I only have the single drop-down at the top. I imported yesterday so I donā€™t think itā€™s an old version, but Iā€™m not sure. I used the Import Blueprint button at the top, but the name of my Blueprint and the name of yours are different, so Iā€™m wondering if the wrong version is linked or if I did something odd.

Thanks in advance for working on a hold to dim blueprint for Pico remotes, been looking for this for a while! Unfortunately this blueprint breaks automations when I try to use it though. Does this happen to anyone else? Whenever I try saving an automation with this blueprint, the automation integration completely crashes until the blueprint is deleted and Home Assistant is restarted. Seems to only be happening with this blueprint as others are working fine.

Looks like an older version. Try this oneā€¦ Lutron Pico 5 Button - Light Entity Control Ā· GitHub

What HA Core version are you running? I had an issue with 10.0 and 10.1 that cleared up in 10.2.

The new link worked. Not sure if youā€™re able to update the ā€œClick to load into HAā€ button at the top of this thread, but the reason it didnā€™t work for me is because that installs an older version.

10.0 was the issue, thanks for the help! The blueprint works great after updating.

I fixed the link. Sorry about that.

There is something in the 2022.12.0 update that is breaking the automations created by this blueprint. I am trying to get it sorted out.

I have located the issue with 2022.12.0. It appears that something was changed with the handling of blank device ids with respect to automations. I have updated the link with a fix. However, the support for multiple Picos has been disabled. Therefore, if you created an automation with more that one Pico, you will have to now create additional automations.

A bit more detail:

In order to allow for the control of a single set of entities by more than one Pico, I used the ā€˜enabledā€™ variable in order to tell HA whether to pay attention to Picos 2, 3, and 4 of the automation. The Pico device was left blank but the ā€˜enabledā€™ variable was false, so no harm. Like thisā€¦

trigger:
ā€¦

  • enabled: !input enabled_2
    platform: device
    device_id: !input pico_2
    domain: lutron_caseta
    type: press
    subtype: ā€˜onā€™
    id: on_pressed
    ā€¦

It appears that, as of 2022.12.0, even though a trigger is not enabled, you can no longer have a blank device_id in the automation.

I will try to figure out a workaround, but for now, the ability to specify more that one Pico in this automation has be disabled.

You will need to redownload the blueprint.

Has something recently changed with he picos? I have a bunch in my house and went to go make a change to one of the buttons and noticed that I can no longer select a pico and use a blueprint I was using. When I pulled up the actual pico, now all individual buttons are there, but the are hidden. If I unhide and enable them, the blueprint no longer functions the same way and Iā€™d end up having to create a separate automation for every single button of every remote.

When the Lutron integration adds a Pico device to Home Assistant, all of the button entities (ā€œonā€ , ā€œraiseā€, ā€œstopā€, etc.) related to the device are disabled. A while back there was a change applied to the Blueprint selector code. With the change, a device must now have at least one enabled entity in order for the selector to include the device in the list.

To get around this, simply enable one of the button entities and the device will then show.